git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
block: Fix memory leak in alloc_disk_node()
[safe/jmp/linux-2.6]
/
block
/
genhd.c
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;
}