[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] qemu-sockets: Fix potential memory leak
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-trivial] [PATCH] qemu-sockets: Fix potential memory leak |
Date: |
Sat, 22 Sep 2012 16:29:22 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Sep 01, 2012 at 09:40:26AM +0200, Stefan Weil wrote:
> The old code leaks variable 'peer'.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> qemu-sockets.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Report from smatch:
> qemu-sockets.c:404 inet_dgram_opts(101) warn: variable dereferenced before
> check 'peer' (see line 401)
>
> It looks like this warning does not make sense, but nevertheless
> it helped me to discover the leak.
>
> Regards,
> Stefan Weil
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan