btrfs-progs: return -ENOMEM properly in btrfs_read_block_groups()
authorEryu Guan <guaneryu@gmail.com>
Mon, 19 Oct 2015 11:38:00 +0000 (19:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 2 Nov 2015 08:35:03 +0000 (09:35 +0100)
commit8a9c9adbe5a96ceb34989e77ef407d48f488ccd0
treead0ece4c25f68c722909a7887a67064835c92334
parent1669d8afa647c63a8a28669b9eadfb64ce98f3d7
btrfs-progs: return -ENOMEM properly in btrfs_read_block_groups()

Breaking from the while loop makes ret overwritten to zero, goto error
label directly and return -ENOMEM.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
extent-tree.c