Skip to content

Commit 006e5c1

Browse files
committed
CID 909249: FORWARD_NULL
1 parent 2dc42cd commit 006e5c1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

plugins/protocol_lws_dht_dnssec_monitor/protocol_lws_dht_dnssec_monitor.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,8 @@ callback_dht_dnssec_monitor(struct lws *wsi, enum lws_callback_reasons reason,
21092109
/* Handshake might be in progress or done.
21102110
* If lws_is_ssl is true, we can try to extract. */
21112111
if (lws_is_ssl(wsi)) {
2112-
extract_and_queue_cert_result(wsi, vhd, cci, protocol);
2112+
if (vhd)
2113+
extract_and_queue_cert_result(wsi, vhd, cci, protocol);
21132114
cci->magic = 0;
21142115
free(cci);
21152116
lws_set_opaque_user_data(wsi, NULL);
@@ -2214,7 +2215,8 @@ callback_dht_dnssec_monitor(struct lws *wsi, enum lws_callback_reasons reason,
22142215
if (cci && cci->magic == CERT_CHECK_MAGIC) {
22152216
if (cci->starttls_state == 4) {
22162217
lwsl_notice("[INSTRUMENT] Probe %s STARTTLS handshake finished, extracting cert\n", cci->fqdn);
2217-
extract_and_queue_cert_result(wsi, vhd, cci, protocol);
2218+
if (vhd)
2219+
extract_and_queue_cert_result(wsi, vhd, cci, protocol);
22182220
cci->magic = 0;
22192221
free(cci);
22202222
lws_set_opaque_user_data(wsi, NULL);

0 commit comments

Comments
 (0)