greybus: power_supply: fix leak getting string properties
authorRui Miguel Silva <rui.silva@linaro.org>
Fri, 8 Jan 2016 13:53:46 +0000 (13:53 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 12 Jan 2016 03:18:14 +0000 (19:18 -0800)
commitf921fb139bd5ee008ec993c76b8a89a535fd11e9
tree726e26a1f65cf713838bd6f9b3e1b00f2d47ece2
parentd9eafd58e3e365d71cd7d477a1c5675db1931027
greybus: power_supply: fix leak getting string properties

When fetching string properties, memory was being allocated and leaked
when it was not necessary to do so.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/power_supply.c