projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c8d721
)
block: Fix memory leak in alloc_disk_node()
author
Jerome Marchand
<jmarchan@redhat.com>
Fri, 23 Nov 2007 08:17:53 +0000
(09:17 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 27 Nov 2007 08:19:40 +0000
(09:19 +0100)
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 <jmarchan@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/genhd.c
patch
|
blob
|
history
diff --git
a/block/genhd.c
b/block/genhd.c
index
e609996
..
f2ac914
100644
(file)
--- 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;
}