[PATCH] ppc64: lparconfig.c memory leak
authorJoel Schopp <jschopp@austin.ibm.com>
Fri, 12 Aug 2005 19:34:58 +0000 (14:34 -0500)
committerPaul Mackerras <paulus@samba.org>
Tue, 30 Aug 2005 03:42:35 +0000 (13:42 +1000)
This patch fixes a rare memory leak found by Coverity.

Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc64/kernel/lparcfg.c

index 9d034ff062b166b2beaae7138b992d280cf63804..edad361a8db00a9fbc5e3c7950ee575e22f8d4db 100644 (file)
@@ -273,6 +273,7 @@ static void parse_system_parameter_string(struct seq_file *m)
                if (!workbuffer) {
                        printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
                               __FILE__, __FUNCTION__, __LINE__);
+                       kfree(local_buffer);                    
                        return;
                }
 #ifdef LPARCFG_DEBUG