From: Viresh Kumar Date: Thu, 13 Nov 2014 12:44:32 +0000 (+0530) Subject: greybus: manifest: don't free unallocated resources X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50fc08f8c023d1e698207342e003f1b6d4bca1f5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: manifest: don't free unallocated resources Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index 964f85ed603c..777abf400325 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -268,7 +268,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod, gmod->product_string = gb_string_get(desc_module->product_stringid); if (IS_ERR(gmod->product_string)) { - goto out_err; + goto out_free_vendor_string; } gmod->vendor = le16_to_cpu(desc_module->vendor); @@ -289,6 +289,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod, out_err: kfree(gmod->product_string); gmod->product_string = NULL; +out_free_vendor_string: kfree(gmod->vendor_string); gmod->vendor_string = NULL;