From d8e42944327f526427ac8c4d31841c8db75356fe Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 15 Oct 2020 15:29:44 +0200 Subject: [PATCH] Fix double free and memory leak Found with the Clang Static Analyzer. This is a copy & paste error. This bug was introduced in 72e2307c16e777e24d35e7c6c72788f5e2f26850 in Jul 2018. --- kitty/macos_process_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/macos_process_info.c b/kitty/macos_process_info.c index cff4f039c..3a09ebc1c 100644 --- a/kitty/macos_process_info.c +++ b/kitty/macos_process_info.c @@ -248,7 +248,7 @@ error: if (procargs != NULL) free(procargs); if (procenv != NULL) - free(procargs); + free(procenv); return NULL; }