--- libaitsync/src/dir.c 2012/11/13 13:58:39 1.3.2.4 +++ libaitsync/src/dir.c 2014/02/04 16:39:00 1.4.6.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: dir.c,v 1.3.2.4 2012/11/13 13:58:39 misho Exp $ +* $Id: dir.c,v 1.4.6.1 2014/02/04 16:39:00 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004 - 2014 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -324,6 +324,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 if (lstat(csDir2, &sb) == -1) { LOGERR; + free(tags); free(l); return -1; } @@ -333,6 +334,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 LOGERR; chdir(old); free(old); + free(tags); free(l); return -1; } @@ -341,6 +343,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 LOGERR; chdir(old); free(old); + free(tags); free(l); return -1; } @@ -361,6 +364,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 chdir(old); free(old); closedir(dir); + free(tags); return -1; } else memset(&l[n + 1], 0, sizeof(struct tagDirName)); @@ -432,6 +436,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 f = fopen(csDir2, "r"); if (!f) { LOGERR; + free(tags); free(l); return -1; } @@ -460,6 +465,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 LOGERR; if (strcmp(csDir2, "-")) fclose(f); + free(tags); return -1; } else memset(&l[n + 1], 0, sizeof(struct tagDirName)); @@ -487,6 +493,7 @@ sync_dircmpList(const char *csDir1, const char *csDir2 } n -= cx; + free(tags); *list = l; return n; }