From: Andy Green Date: Sun, 28 Aug 2016 01:15:26 +0000 (+0800) Subject: coverity 169268 + 169270- dead code plus repeat NULL check on error path X-Git-Tag: accepted/tizen/4.0/unified/20171012.191640~359 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd02a15669f3088609e3e89482c0aa871243edc3;p=platform%2Fupstream%2Flibwebsockets.git coverity 169268 + 169270- dead code plus repeat NULL check on error path --- diff --git a/lib/client.c b/lib/client.c index 4171cbc..6af36c8 100755 --- a/lib/client.c +++ b/lib/client.c @@ -921,9 +921,10 @@ bail3: close_reason = LWS_CLOSE_STATUS_NOSTATUS; bail2: - wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_CONNECTION_ERROR, + if (wsi->protocol) + wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_CONNECTION_ERROR, wsi->user_space, (void *)cce, - (unsigned int) (cce ? strlen(cce): 0)); + (unsigned int)strlen(cce)); wsi->already_did_cce = 1; lwsl_info("closing connection due to bail2 connection error\n");