diff options
author | Andy Green <andy@warmcat.com> | 2021-11-08 09:56:55 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2021-11-08 11:05:28 +0000 |
commit | b0cd8f6703645ac2eafd65e841c5f06458a7c319 (patch) | |
tree | 4785e1405bfab421ba2ab8aacff1fd7556f16f28 | |
parent | 6e9c25d1f76f40a91a070a237359189feb3f8d7d (diff) | |
download | libwebsockets-b0cd8f6703645ac2eafd65e841c5f06458a7c319.tar.gz |
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.
-rw-r--r-- | lib/secure-streams/protocols/ss-h1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 73cc2562..9bfed470 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -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)); |