From ebe43d1b25caed0749fad1a5666402e162d0d1b4 Mon Sep 17 00:00:00 2001 From: dingfei Date: Sat, 31 Aug 2024 11:55:44 +0800 Subject: [PATCH] Free malloc'ed memory --- src/startup/darling.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/startup/darling.c b/src/startup/darling.c index 6014f46e81..a3f27fbf38 100644 --- a/src/startup/darling.c +++ b/src/startup/darling.c @@ -280,6 +280,8 @@ static void pushShellspawnCommandData(int sockfd, shellspawn_cmd_type_t type, co fprintf(stderr, "Error sending command to shellspawn: %s\n", strerror(errno)); exit(EXIT_FAILURE); } + + free(cmd); } static void pushShellspawnCommand(int sockfd, shellspawn_cmd_type_t type, const char* value)