Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcp: coverity don't close(-1)
  • Loading branch information
perexg committed Oct 3, 2014
1 parent d5712f1 commit d4611d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tcp.c
Expand Up @@ -730,7 +730,8 @@ tcp_server_done(void)
LIST_FOREACH(tsl, &tcp_server_active, alink) {
if (tsl->ops.cancel)
tsl->ops.cancel(tsl->opaque);
close(tsl->fd);
if (tsl->fd >= 0)
close(tsl->fd);
tsl->fd = -1;
pthread_kill(tsl->tid, SIGTERM);
}
Expand Down

0 comments on commit d4611d1

Please sign in to comment.