greybus: manifest: don't free unallocated resources

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Viresh Kumar 2014-11-13 18:14:32 +05:30 committed by Greg Kroah-Hartman
parent 4ed16a81c1
commit 50fc08f8c0
1 changed files with 2 additions and 1 deletions

View File

@ -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;