Message ID | 1445254680-11102-11-git-send-email-guaneryu@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/extent-tree.c b/extent-tree.c index 0c8152a..97cf961 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -3255,7 +3255,7 @@ int btrfs_read_block_groups(struct btrfs_root *root) cache = kzalloc(sizeof(*cache), GFP_NOFS); if (!cache) { ret = -ENOMEM; - break; + goto error; } read_extent_buffer(leaf, &cache->item,
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> --- extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)