From: Jesper Juhl 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 Signed-off-by: Andrew Morton --- drivers/pnp/pnpbios/proc.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN drivers/pnp/pnpbios/proc.c~avoid-a-small-unlikely-memory-leak-in-proc_read_escd drivers/pnp/pnpbios/proc.c --- a/drivers/pnp/pnpbios/proc.c~avoid-a-small-unlikely-memory-leak-in-proc_read_escd +++ a/drivers/pnp/pnpbios/proc.c @@ -94,8 +94,9 @@ static int proc_read_escd(char *buf, cha /* 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; } _