From f14ea7a906f27d156a8ea5a31b3135f1db5b1148 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 30 Nov 2014 12:45:39 +0800 Subject: [PATCH] coverity 83673 deference after NULL check Signed-off-by: Andy Green --- lib/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server.c b/lib/server.c index 1132122b9..d66376b8b 100644 --- a/lib/server.c +++ b/lib/server.c @@ -470,7 +470,7 @@ upgrade_ws: lwsl_info("checking %s\n", protocol_name); n = 0; - while (context->protocols[n].callback) { + while (wsi->protocol && context->protocols[n].callback) { if (!wsi->protocol->name) { n++; continue;