[utils.c:983]: (error) Memory leak: fullpath
Signed-off-by: Kenji Okimoto <okimoto@xxxxxxxxxxxxxx>
---
utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/utils.c b/utils.c
index 205e667..3efb3af 100644
--- a/utils.c
+++ b/utils.c
@@ -980,6 +980,7 @@ again:
dirp = opendir(dirname);
if (!dirp) {
fprintf(stderr, "Unable to open %s for scanning\n", dirname);
+ free(fullpath);
return -ENOENT;
}
while(1) {
@@ -1030,6 +1031,7 @@ again:
free(pending);
pending = list_entry(pending_list.next, struct pending_dir,
list);
+ free(fullpath);
list_del(&pending->list);
closedir(dirp);
dirp = NULL;
@@ -1038,6 +1040,7 @@ again:
ret = 0;
fail:
free(pending);
+ free(fullpath);
if (dirp)
closedir(dirp);
return ret;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html