Skip to content

Commit 478ff64

Browse files
frowandrobherring
authored andcommitted
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: e0a58f3 ("of: overlay: remove a dependency on device node full_name") Reported-by: Erhard F. <[email protected]> Signed-off-by: Frank Rowand <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent 145fc13 commit 478ff64

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/of/overlay.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ static struct property *dup_and_fixup_symbol_prop(
261261

262262
of_property_set_flag(new_prop, OF_DYNAMIC);
263263

264+
kfree(target_path);
265+
264266
return new_prop;
265267

266268
err_free_new_prop:

0 commit comments

Comments
 (0)