2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

sk-packet: fix error handling

lookup_socket() returns pointer or NULL.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2013-03-27 15:07:55 +04:00
committed by Pavel Emelyanov
parent e902861c08
commit 27d0bbe549

View File

@@ -152,7 +152,7 @@ static int dump_one_packet_fd(int lfd, u32 id, const struct fd_parms *p)
int i, ret;
sd = (struct packet_sock_desc *)lookup_socket(p->stat.st_ino, PF_PACKET);
if (sd < 0)
if (sd == NULL)
return -1;
pr_info("Dumping packet socket fd %d id %#x\n", lfd, id);