Displaying 1 result from an estimated 1 matches for "fail_no_files".
2011 Jun 26
0
[PATCH] mkfs.btrfs: Fix compilation errors with gcc 4.6
...ror\n");
- goto fail;
+ return -1;
}
leaf = path.nodes[0];
@@ -913,7 +913,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
if (chdir(parent_dir_entry->path)) {
fprintf(stderr, "chdir error for %s\n",
parent_dir_name);
- goto fail;
+ goto fail_no_files;
}
count = scandir(parent_dir_entry->path, &files,
@@ -996,6 +996,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
return 0;
fail:
free_namelist(files, count);
+fail_no_files:
free(parent_dir_entry->path);
free(parent_dir_entry);
return -1;
--
1.7.2...