[PATCH] MTD: FTL layer: don't free input argument in add_mtd_blktrans_dev
Artem Bityutskiy
dedekind1 at gmail.com
Tue Jan 18 03:32:37 EST 2011
On Sun, 2011-01-09 at 01:25 +0200, Maxim Levitsky wrote:
> This one liner patch fixes double free that will occur if add_mtd_blktrans_dev
> fails. On failure it free input argument, but all its users
> also free it on error which is natural thing to do.
> Thus don't free it.
>
> All credit for finding that bug belongs to reporters of the bug in the android bugzilla
> http://code.google.com/p/android/issues/detail?id=13761
>
> Signed-of-by: Maxim Levitsky <maximlevitsky at gmail.com>
Signed-off-by, (off, not of). I'll fix this.
I'll change your subject line to:
mtd: mtd_blkdevs: fix double free on error path
a) We use "mtd:" prefix, not "MTD:".
b). mtd_blkdevs is not really an FTL layer, I think.
c). The subject line has to make it obvious whether this is a bugfix or
something else - it makes life of people who look at commit messages ans
search for stuff important stuff easier. Your subject line is
technically correct, but not very helpful.
Anyway, picked to l2-mtd-2.6.git, thanks!
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list