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
(parent:
40af8f4
)
Btrfs-progs: fsck: fix memory leak and unnecessary call to free
author
Rakesh Pandit
<rakesh@tuxera.com>
Sat, 15 Mar 2014 12:22:37 +0000
(14:22 +0200)
committer
Chris Mason
<clm@fb.com>
Fri, 21 Mar 2014 16:51:31 +0000
(09:51 -0700)
Free already allocated memory to item1_data if malloc fails for
item2_data in swap_values. Seems to be a typo from commit
70749a77
.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
cmds-check.c
patch
|
blob
|
history
diff --git
a/cmds-check.c
b/cmds-check.c
index d1cafe1d231454703fc75313793cc5fa9ac21962..60708d05c4c870e6a2cbecda8b9d41cab8d62a8d 100644
(file)
--- a/
cmds-check.c
+++ b/
cmds-check.c
@@
-2380,7
+2380,7
@@
static int swap_values(struct btrfs_root *root, struct btrfs_path *path,
return -ENOMEM;
item2_data = malloc(item2_size);
if (!item2_data) {
- free(item
2
_data);
+ free(item
1
_data);
return -ENOMEM;
}