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++)
|
for (i = 0; i < fi_args.num_devices; i++)
|
||||||
if (start_args.start.srcdevid == di_args[i].devid)
|
if (start_args.start.srcdevid == di_args[i].devid)
|
||||||
break;
|
break;
|
||||||
|
free(di_args);
|
||||||
if (i == fi_args.num_devices) {
|
if (i == fi_args.num_devices) {
|
||||||
fprintf(stderr, "Error: '%s' is not a valid devid for filesystem '%s'\n",
|
fprintf(stderr, "Error: '%s' is not a valid devid for filesystem '%s'\n",
|
||||||
srcdev, path);
|
srcdev, path);
|
||||||
|
|
Loading…
Reference in New Issue