From 90ab214ec06ecefaec0149f75acf3cb6889d2c18 Mon Sep 17 00:00:00 2001 From: UnWaDo <37781498+UnWaDo@users.noreply.github.com> Date: Thu, 17 Feb 2022 18:22:55 +0300 Subject: [PATCH] mlx_destroy_display leaves memory unfreed `mlx_destroy_display` was added to free memory, allocated with `mlx_init`. Unfortunately, now it leaves `t_xvar *xvar` unfreed, so memory is still leaking --- mlx_destroy_display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mlx_destroy_display.c b/mlx_destroy_display.c index d2970b8f..730dadd5 100644 --- a/mlx_destroy_display.c +++ b/mlx_destroy_display.c @@ -15,4 +15,5 @@ int mlx_destroy_display(t_xvar *xvar) { XCloseDisplay(xvar->display); + free(xvar); }