[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200422095034.550915891@linuxfoundation.org>
Date: Wed, 22 Apr 2020 11:56:19 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, "Erhard F." <erhard_f@...lbox.org>,
Frank Rowand <frank.rowand@...y.com>,
Rob Herring <robh@...nel.org>
Subject: [PATCH 5.4 018/118] of: overlay: kmemleak in dup_and_fixup_symbol_prop()
From: Frank Rowand <frank.rowand@...y.com>
commit 478ff649b1c8eb2409b1a54fb75eb46f7c29f140 upstream.
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: e0a58f3e08d4 ("of: overlay: remove a dependency on device node full_name")
Reported-by: Erhard F. <erhard_f@...lbox.org>
Signed-off-by: Frank Rowand <frank.rowand@...y.com>
Signed-off-by: Rob Herring <robh@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/of/overlay.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -261,6 +261,8 @@ static struct property *dup_and_fixup_sy
of_property_set_flag(new_prop, OF_DYNAMIC);
+ kfree(target_path);
+
return new_prop;
err_free_new_prop:
Powered by blists - more mailing lists