Re: [CHECKER] 24 memory leaks on error paths in 2.4.17

From: Robert Love (rml@tech9.net)
Date: Mon Jun 10 2002 - 17:45:32 EST


On Sun, 2002-06-09 at 20:55, Dawson Engler wrote:
> This checker warns when you do not free allocated memory on failure paths.
> Note: while we only include 24 errors, there were lots in general; let me
> know if more are useful.

Yes they are very useful! The work you do is amazingly useful and you
have quite a neat tool there ;)

> 1 | /2.4.17/socket.c
>
> if ((sk=sock->sk) == NULL)
> Error --->
> return -EINVAL;

Yep, this is a bug. It is tricky because in cases where !on, fna does
not need to be freed... so I can see how this was missed.

Marcelo, attached patch, against 2.4.19-pre10, fixes this bug...

        Robert Love



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:19 EST