From 8ab2b5af8bfb8ffacf13243716f3d2fc46c00449 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 12:56:21 +0800 Subject: [PATCH] coverity 83664 consistently check NULL Signed-off-by: Andy Green --- lib/service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/service.c b/lib/service.c index ca0985b1..ec3681b9 100644 --- a/lib/service.c +++ b/lib/service.c @@ -383,7 +383,8 @@ libwebsocket_service_fd(struct libwebsocket_context *context, /* it was the guy we came to service! */ timed_out = 1; /* mark as handled */ - pollfd->revents = 0; + if (pollfd) + pollfd->revents = 0; } } }