Re: [PATCH] drm/of: free the right object

2021-07-12 Thread Daniel Vetter
On Fri, Jul 09, 2021 at 10:07:17PM +0200, Julia Lawall wrote: > There is no need to free a NULL value. Instead, free the object > that is leaking due to the iterator. > > The semantic patch that finds this problem is as follows: > > // > @@ > expression x,e; > identifier f; > @@ > x = f(...);

[PATCH] drm/of: free the right object

2021-07-09 Thread Julia Lawall
There is no need to free a NULL value. Instead, free the object that is leaking due to the iterator. The semantic patch that finds this problem is as follows: // @@ expression x,e; identifier f; @@ x = f(...); if (x == NULL) { ... when any when != x = e * of_node_put