1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

ss-h1: coverity: add needless header NULL check

Coverity does not understand that once we checked that  the header has
a non-zero length, the associated pointer can never be NULL.  Add a
pointless check to make it happy.
This commit is contained in:
Andy Green 2021-11-08 09:56:55 +00:00
parent 6e9c25d1f7
commit b0cd8f6703

View file

@ -326,7 +326,7 @@ lws_extract_metadata(lws_ss_handle_t *h, struct lws *wsi)
const char *cp = lws_hdr_simple_ptr(wsi,
polmd->value_is_http_token);
omd = lws_ss_get_handle_metadata(h, polmd->name);
if (!omd)
if (!omd || !cp)
return 1;
assert(!strcmp(omd->name, polmd->name));