[CRIU] [PATCH 2/2] sk-packet: fix memory leak
Pavel Emelyanov
xemul at parallels.com
Tue Apr 9 16:56:35 EDT 2013
On 04/07/2013 01:20 AM, Andrey Vagin wrote:
> CID 996188 (#1 of 1): Resource leak (RESOURCE_LEAK)
> 13. leaked_storage: Variable sd going out of scope leaks the storage it points to.
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> sk-packet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sk-packet.c b/sk-packet.c
> index 05d1a5e..bd30a07 100644
> --- a/sk-packet.c
> +++ b/sk-packet.c
> @@ -280,7 +280,7 @@ int packet_receive_one(struct nlmsghdr *hdr, void *arg)
> memcpy(&sd->nli, RTA_DATA(tb[PACKET_DIAG_INFO]), sizeof(sd->nli));
>
> if (packet_save_mreqs(sd, tb[PACKET_DIAG_MCLIST]))
> - return -1;
> + goto err;
>
> if (tb[PACKET_DIAG_FANOUT])
> sd->fanout = *(__u32 *)RTA_DATA(tb[PACKET_DIAG_FANOUT]);
>
applied
More information about the CRIU
mailing list