Skip to content

Commit

Permalink
Prevent segfault with failed TLS handshake?
Browse files Browse the repository at this point in the history
Need proper review for this patch!  Sara?
  • Loading branch information
wtoorop committed Nov 15, 2015
1 parent 95618bb commit 08bf613
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1501,9 +1501,15 @@ upstream_write_cb(void *userarg)
{
getdns_upstream *upstream = (getdns_upstream *)userarg;
getdns_network_req *netreq = upstream->write_queue;
getdns_dns_req *dnsreq = netreq->owner;
getdns_dns_req *dnsreq;
int q;

if (!netreq) {
GETDNS_CLEAR_EVENT(upstream->loop, &upstream->event);
upstream->event.write_cb = NULL;
return;
}
dnsreq = netreq->owner;
/* TODO: think about TCP AGAIN */
netreq->debug_start_time = _getdns_get_time_as_uintt64();

Expand Down

0 comments on commit 08bf613

Please sign in to comment.