]> git.baikalelectronics.ru Git - kernel.git/commit
of: dynamic: fix memory leak related to properties of __of_node_dup
authorLixin Wang <alan.1.wang@nokia-sbell.com>
Mon, 23 Oct 2017 03:19:53 +0000 (11:19 +0800)
committerRob Herring <robh@kernel.org>
Mon, 23 Oct 2017 16:18:44 +0000 (11:18 -0500)
commit4ab7dbabd9e3b1d2495d9e8354d6e4ece3b78130
tree2e37ee4f89085d9b8c2e9eb0d916ede61fe51dbb
parent9117bcd7b91ecfd0a95f6e7c6a92260d0cb51c3d
of: dynamic: fix memory leak related to properties of __of_node_dup

If a node with no properties is dynamically added, then a property is
dynamically added to the node, then the property is dynamically removed,
the result will be node->properties == NULL and node->deadprops != NULL.

Add a separate function to release the properties in both lists.

Signed-off-by: Lixin Wang <alan.1.wang@nokia-sbell.com>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/dynamic.c