[CRIU] [PATCH 2/2] sk-packet: fix memory leak
Andrey Vagin
avagin at openvz.org
Sat Apr 6 17:20:30 EDT 2013
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]);
--
1.7.11.7
More information about the CRIU
mailing list