projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e14e83
)
block: fix add_partition() error path
author
Tejun Heo
<tj@kernel.org>
Mon, 10 Nov 2008 06:28:59 +0000
(15:28 +0900)
committer
Jens Axboe
<jens.axboe@oracle.com>
Tue, 18 Nov 2008 14:08:55 +0000
(15:08 +0100)
Partition stats structure was not freed on devt allocation failure
path. Fix it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/partitions/check.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/partitions/check.c
b/fs/partitions/check.c
index 633f7a0ebb2cdfb28207cbb9ec14128ede23f59b..90bcf136a9de29f86b9ceae07c348849c5785e28 100644
(file)
--- a/
fs/partitions/check.c
+++ b/
fs/partitions/check.c
@@
-395,7
+395,7
@@
int add_partition(struct gendisk *disk, int partno,
err = blk_alloc_devt(p, &devt);
if (err)
- goto out_free;
+ goto out_free
_stats
;
pdev->devt = devt;
/* delay uevent until 'holders' subdir is created */
@@
-426,6
+426,8
@@
int add_partition(struct gendisk *disk, int partno,
return 0;
+out_free_stats:
+ free_part_stats(p);
out_free:
kfree(p);
return err;