summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-02-25 16:54:45 -0600
committerDavid Sterba <dsterba@suse.cz>2013-02-27 14:39:53 +0100
commit1b12f5c9f7696f02ea6cbe8779bcaf28e90f9dba (patch)
tree665f6720a787166e9850dcb8ebe5201b1d991914
parent3d118fe6c4bd0a3e4ae3a0696aec41d60cfd7eef (diff)
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>
-rw-r--r--cmds-replace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-replace.c b/cmds-replace.c
index 9397396c..4cc32df2 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -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);