projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3d118fe
)
btrfs-progs: free allocated di_args in cmd_start_replace
author
Eric Sandeen
<sandeen@redhat.com>
Mon, 25 Feb 2013 22:54:45 +0000
(16:54 -0600)
committer
David Sterba
<dsterba@suse.cz>
Wed, 27 Feb 2013 13:39:53 +0000
(14:39 +0100)
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>
cmds-replace.c
patch
|
blob
|
history
diff --git
a/cmds-replace.c
b/cmds-replace.c
index
9397396
..
4cc32df
100644
(file)
--- 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);