1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

Arrange cleanup problem detected by ASAN.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Frederic Clere
2026-10-11 21:12:31 +00:00
parent 899294692f
commit 9e1473f2c6

View File

@@ -814,6 +814,14 @@ static void h2_session_run(struct h2_session *session)
static void h2_session_close(struct h2_session *session)
{
if (session->ngh2) {
nghttp2_session_del(session->ngh2);
session->ngh2 = NULL;
}
if (session->fd >= 0) {
close(session->fd);
session->fd = -1;
}
log_infof(cmd, "closed session to %s:%u",
session->connect_host, session->connect_port);
}
@@ -1118,5 +1126,11 @@ int main(int argc, char *argv[])
h2_session_run(&session);
h2_session_close(&session);
free(stream);
free((void *)uri.host);
if (uri.authority != uri.host)
free((void *)uri.authority);
free((void *)uri.path);
free((void *)host);
return 0;
}