Cleanup memory in error case

In case that we leave due to malformed string,
free the allocated memory before returning.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
Cc: Michael Heimpold <mhei@heimpold.de>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Chris Ball <chris@printf.net>
1 file changed