From 9ab7d1edffeeabd3dcbd18315480d83ccc63f4ea Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 1 Oct 2024 13:22:20 +0300 Subject: [PATCH] twn_gl_15_rendering.c: fix memory leak in finally_render_skybox() --- src/rendering/twn_gl_15_rendering.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index fa83c00..ac6f45d 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -502,7 +502,8 @@ void finally_render_skybox(char *paths) { SDL_free(paths_cache); paths_cache = paths; loading_needed = true; - } + } else + SDL_free(paths); Matrix4 camera_look_at_matrix_solipsist = camera_look_at_matrix; camera_look_at_matrix_solipsist.row[3].x = 0;