Fix memleak (#17307)

This commit is contained in:
Viačasłaŭ 2024-12-29 20:57:45 +03:00 committed by GitHub
parent fe1575bc54
commit 945d3ebc5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -878,10 +878,8 @@ struct http_t *net_http_new(struct http_connection_t *conn)
if ((state->data = (char*)malloc(state->buflen)))
{
if ((state->headers = string_list_new()) &&
string_list_initialize(state->headers))
if ((state->headers = string_list_new()) != NULL)
return state;
string_list_free(state->headers);
}
free(state);
}