[CRIU] [PATCH] sk-packet: fix error handling
Pavel Emelyanov
xemul at parallels.com
Wed Mar 27 07:53:33 EDT 2013
On 03/27/2013 03:07 PM, Andrey Vagin wrote:
> lookup_socket() returns pointer or NULL.
>
> 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 5151e5f..dafd081 100644
> --- a/sk-packet.c
> +++ b/sk-packet.c
> @@ -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);
>
applied
More information about the CRIU
mailing list