mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
btrfs-progs: free allocated di_args in cmd_start_replace
We only freed this allocation in error paths, and leaked a bit when it went out of scope normally. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This commit is contained in:
parent
3d118fe6c4
commit
1b12f5c9f7
@ -228,6 +228,7 @@ static int cmd_start_replace(int argc, char **argv)
|
||||
for (i = 0; i < fi_args.num_devices; i++)
|
||||
if (start_args.start.srcdevid == di_args[i].devid)
|
||||
break;
|
||||
free(di_args);
|
||||
if (i == fi_args.num_devices) {
|
||||
fprintf(stderr, "Error: '%s' is not a valid devid for filesystem '%s'\n",
|
||||
srcdev, path);
|
||||
|
Loading…
Reference in New Issue
Block a user