From: Krzysztof Kozlowski Date: Wed, 15 Oct 2014 14:25:10 +0000 (+0200) Subject: power: bq2415x_charger: Fix memory leak on DTS parsing error X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~106^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21e863b233553998737e1b506c823a00bf012e00;p=pandora-kernel.git power: bq2415x_charger: Fix memory leak on DTS parsing error Memory allocated for 'name' was leaking if required binding properties were not present. The memory for 'name' was allocated early at probe with kasprintf(). It was freed in error paths executed before and after parsing DTS but not in that error path. Fix the error path for parsing device tree properties. Signed-off-by: Krzysztof Kozlowski Fixes: faffd234cf85 ("bq2415x_charger: Add DT support") Cc: Signed-off-by: Sebastian Reichel --- Reading git-diff-tree failed