Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcp: don't crash when tcp server cannot be registered, fixes #2315
  • Loading branch information
perexg committed Sep 20, 2014
1 parent 24e2c3d commit 710119a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tcp.c
Expand Up @@ -622,6 +622,9 @@ void tcp_server_register(void *server)
tcp_server_t *ts = server;
tvhpoll_event_t ev;

if (ts == NULL)
return;

memset(&ev, 0, sizeof(ev));

ev.fd = ts->serverfd;
Expand Down

0 comments on commit 710119a

Please sign in to comment.