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(...);
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