mirror of
https://github.com/libretro/RetroArch
synced 2025-02-05 06:40:07 +00:00
Fix memleak (#17307)
This commit is contained in:
parent
fe1575bc54
commit
945d3ebc5f
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user