From 618fc6e2db6a1dee81ce37e3ae01f2e504ea6988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Via=C4=8Das=C5=82a=C5=AD=20Chalikin?= Date: Sun, 29 Dec 2024 17:09:21 +0300 Subject: [PATCH] Fix memleak --- libretro-common/net/net_http.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c index 8b425cb7a588..486459af9b16 100644 --- a/libretro-common/net/net_http.c +++ b/libretro-common/net/net_http.c @@ -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); }