]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: battery-gb.c: fix memory leak found by Viresh
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 21 Oct 2014 07:51:53 +0000 (15:51 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 21 Oct 2014 07:51:53 +0000 (15:51 +0800)
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/battery-gb.c

index 03c16f7a5301a1b2699ef84fc972698850707b38..fd2b86e5579cae10b64faaf9035fd79827455860 100644 (file)
@@ -139,6 +139,7 @@ static int battery_operation(struct gb_battery *gb, int type,
        }
 out:
        gb_operation_destroy(operation);
+       kfree(local_response);
 
        return ret;
 }