Commit 50fc08f8 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: manifest: don't free unallocated resources

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 4ed16a81
...@@ -268,7 +268,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod, ...@@ -268,7 +268,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod,
gmod->product_string = gb_string_get(desc_module->product_stringid); gmod->product_string = gb_string_get(desc_module->product_stringid);
if (IS_ERR(gmod->product_string)) { if (IS_ERR(gmod->product_string)) {
goto out_err; goto out_free_vendor_string;
} }
gmod->vendor = le16_to_cpu(desc_module->vendor); gmod->vendor = le16_to_cpu(desc_module->vendor);
...@@ -289,6 +289,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod, ...@@ -289,6 +289,7 @@ static bool gb_manifest_parse_module(struct gb_module *gmod,
out_err: out_err:
kfree(gmod->product_string); kfree(gmod->product_string);
gmod->product_string = NULL; gmod->product_string = NULL;
out_free_vendor_string:
kfree(gmod->vendor_string); kfree(gmod->vendor_string);
gmod->vendor_string = NULL; gmod->vendor_string = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment