Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
[#32] fix crash in evhtp_unbind_socket when evlistener fails
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFrench committed Sep 11, 2017
1 parent a31a855 commit 8149a84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions evhtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ htp__callback_find_(evhtp_callbacks_t * cbs,
unsigned int * end_offset)
{
size_t path_len;

#ifndef EVHTP_DISABLE_REGEX
regmatch_t pmatch[28];
#endif
Expand Down Expand Up @@ -3691,6 +3692,11 @@ evhtp_send_reply_chunk_end(evhtp_request_t * request)
void
evhtp_unbind_socket(evhtp_t * htp)
{
if (htp == NULL || htp->server == NULL)
{
return;
}

evhtp_safe_free(htp->server, evconnlistener_free);
}

Expand Down

0 comments on commit 8149a84

Please sign in to comment.