Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7674030e5eb83d9ba29318fb9b3ccedf84d583e
Commit:     c7674030e5eb83d9ba29318fb9b3ccedf84d583e
Parent:     8c8d7214d1b35726e950db1f73317e28e827f1cd
Author:     Jerome Marchand <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 23 09:17:53 2007 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Tue Nov 27 09:19:40 2007 +0100

    block: Fix memory leak in alloc_disk_node()
    
    Fix a memory leak in alloc_disk_node(). Don't forget to free 'dkstats' when 
the allocation of 'part' failed.
    
    Signed-off-by: Jerome Marchand <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/genhd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block/genhd.c b/block/genhd.c
index e609996..f2ac914 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -715,6 +715,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
                        disk->part = kmalloc_node(size,
                                GFP_KERNEL | __GFP_ZERO, node_id);
                        if (!disk->part) {
+                               free_disk_stats(disk);
                                kfree(disk);
                                return NULL;
                        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to