Browse code

fix fname leaks

git-svn: trunk@2457

Tomasz Kojm authored on 2006/10/29 23:53:56
Showing 1 changed files
... ...
@@ -172,6 +172,7 @@ static int multiscan(const char *dirname, const struct cl_node *root, const stru
172 172
 				closedir(dd);
173 173
 				return -1;
174 174
 			    }
175
+			    free(fname);
175 176
 			} else {
176 177
 			    if(S_ISREG(statbuf.st_mode) || (S_ISLNK(statbuf.st_mode) && (checksymlink(fname) == 2) && cfgopt(copt, "FollowFileSymlinks")->enabled)) {
177 178
 
... ...
@@ -212,6 +213,8 @@ static int multiscan(const char *dirname, const struct cl_node *root, const stru
212 212
 				}
213 213
 			    }
214 214
 			}
215
+		    } else {
216
+			free(fname);
215 217
 		    }
216 218
 		}
217 219
 	    }