Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a8b0ac0873cd911b3bf3d6e2db98f80d0b158d56 Commit: a8b0ac0873cd911b3bf3d6e2db98f80d0b158d56 Parent: 5f149cf0ac2ba6c23d77e39fe03290535d13f13d Author: Jesper Juhl <[EMAIL PROTECTED]> AuthorDate: Tue Oct 16 23:26:56 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Oct 17 08:42:51 2007 -0700
pnp: avoid a small unlikely memory leak in proc_read_escd() There's a small and unlikely memory leak in drivers/pnp/pnpbios/proc.c::proc_read_escd(). It's inside a sanity check, so it probably won't trigger often (if at all), however it *is* a potential leak and it's easy to avoid, so let's just fix it :) Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/pnp/pnpbios/proc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c index 9d9841f..bb19bc9 100644 --- a/drivers/pnp/pnpbios/proc.c +++ b/drivers/pnp/pnpbios/proc.c @@ -94,8 +94,9 @@ static int proc_read_escd(char *buf, char **start, off_t pos, /* sanity check */ if (escd_size > MAX_SANE_ESCD_SIZE) { - printk(KERN_ERR - "PnPBIOS: proc_read_escd: ESCD size reported by BIOS read_escd call is too great\n"); + printk(KERN_ERR "PnPBIOS: proc_read_escd: ESCD size reported by" + " BIOS read_escd call is too great\n"); + kfree(tmpbuf); return -EFBIG; } - 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