Btrfs-progs: fi usage: free memory if realloc fails
authorRakesh Pandit <rakesh@tuxera.com>
Sat, 19 Apr 2014 11:12:03 +0000 (14:12 +0300)
committerDavid Sterba <dsterba@suse.cz>
Thu, 4 Dec 2014 15:48:10 +0000 (16:48 +0100)
commit0c1f1b2ae88ec61234e5e8cf87d92434ee947998
tree175e0f3c09f2481da577842b844883fef7dbfb52
parent7c7fd19b8d8f909d1153aa5abc2bb542d4cfd6ae
Btrfs-progs: fi usage: free memory if realloc fails

Lets not assign *info_ptr to 0 before calling free on it and lose
track of already allocated memory if realloc fails in
add_info_to_list. Lets call free first.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-fi-disk_usage.c