greybus: battery-gb.c: fix memory leak found by Viresh

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Greg Kroah-Hartman 2014-10-21 15:51:53 +08:00
parent cc662399dc
commit c9346e19b2

View 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;
}