Commit 20ffe2b2 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

tiny-nghttpd: Fix memory leak

parent 94c80e25
......@@ -372,9 +372,20 @@ static connection* connection_new(int fd)
static void connection_del(connection *conn)
{
stream *strm;
nghttp2_session_del(conn->session);
shutdown(conn->fd, SHUT_WR);
close(conn->fd);
strm = conn->strm_head.next;
while(strm) {
stream *next_strm = strm->next;
stream_del(strm);
strm = next_strm;
}
free(conn);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment