Re: [PATCH v2 2/2] power: bq2415x_charger: Fix memory leak on DTS parsing error

Sebastian Reichel
2014-10-27T17:44:07Z

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

Hi,

On Wed, Oct 15, 2014 at 04:25:10PM +0200, Krzysztof Kozlowski wrote:
> 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 <k.kozlowski@samsung.com>
> Fixes: faffd234cf85 ("bq2415x_charger: Add DT support")
> Cc: <stable@vger.kernel.org>

Applied to next.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]