Skip to content

Commit

Permalink
Fix memleak (#17307)
Browse files Browse the repository at this point in the history
  • Loading branch information
viachaslavic authored Dec 29, 2024
1 parent fe1575b commit 945d3eb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libretro-common/net/net_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 945d3eb

Please sign in to comment.