Commit 478ff649 authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring

of: overlay: kmemleak in dup_and_fixup_symbol_prop()

kmemleak reports several memory leaks from devicetree unittest.
This is the fix for problem 4 of 5.

target_path was not freed in the non-error path.

Fixes: e0a58f3e ("of: overlay: remove a dependency on device node full_name")
Reported-by: default avatarErhard F. <erhard_f@mailbox.org>
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 145fc138
...@@ -261,6 +261,8 @@ static struct property *dup_and_fixup_symbol_prop( ...@@ -261,6 +261,8 @@ static struct property *dup_and_fixup_symbol_prop(
of_property_set_flag(new_prop, OF_DYNAMIC); of_property_set_flag(new_prop, OF_DYNAMIC);
kfree(target_path);
return new_prop; return new_prop;
err_free_new_prop: err_free_new_prop:
......
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