Skip to content

Commit

Permalink
sk-packet: fix memory leak
Browse files Browse the repository at this point in the history
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@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
  • Loading branch information
avagin authored and xemul committed Apr 9, 2013
1 parent 17e2dad commit 7d63375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sk-packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 7d63375

Please sign in to comment.