pnp: avoid a small unlikely memory leak in proc_read_escd()
[cascardo/linux.git] / drivers / pnp / pnpbios / proc.c
index 9d9841f..bb19bc9 100644 (file)
@@ -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;
        }