btrfs-progs: fix memory leaks in error path
authorByongho Lee <bhlee.kernel@gmail.com>
Fri, 21 Aug 2015 08:51:52 +0000 (17:51 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 31 Aug 2015 17:25:12 +0000 (19:25 +0200)
commitae60507e59a1cad43303a0f9e1b72ef4e5bb1e72
tree180a89c224d665244ca3c9b1da680203b2c62d5d
parentd7748770a78a4a44f39f4f0e629885a255d24d90
btrfs-progs: fix memory leaks in error path

This patch includes below fixes in error path:
1. fix memory leaks if realloc() fails
2. add missing call free_history() before return error in scrub_read_file()

Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com>
Reviewed-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
btrfs-list.c
cmds-scrub.c
cmds-send.c
qgroup.c