Btrfs: stop leaking btrfs_bios on readahead
authorIlya Dryomov <idryomov@gmail.com>
Fri, 4 Nov 2011 13:41:02 +0000 (09:41 -0400)
committerChris Mason <chris.mason@oracle.com>
Sun, 6 Nov 2011 08:11:08 +0000 (03:11 -0500)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/reada.c

index cd85711..35eaf68 100644 (file)
@@ -423,6 +423,7 @@ again:
        }
        spin_unlock(&fs_info->reada_lock);
 
+       kfree(multi);
        return re;
 
 error:
@@ -447,6 +448,7 @@ error:
                kref_put(&zone->refcnt, reada_zone_release);
                spin_unlock(&fs_info->reada_lock);
        }
+       kfree(multi);
        kfree(re);
        if (looped)
                goto again;