From: Naveen Albert Date: Tue, 26 Dec 2023 17:14:11 +0000 (+0000) Subject: manager.c: Fix regression due to using wrong free function. X-Git-Tag: certified-18.9-cert8-rc1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a26faa9ac5e9ee44129c397081950fa43dc53734;p=thirdparty%2Fasterisk.git manager.c: Fix regression due to using wrong free function. Commit 424be345639d75c6cb7d0bd2da5f0f407dbd0bd5 introduced a regression by calling ast_free on memory allocated by realpath. This causes Asterisk to abort when executing this function. Since the memory is allocated by glibc, it should be freed using ast_std_free. Resolves: #513 (cherry picked from commit 3ff081e58114753b7ed310d73f22d848251b6426) --- diff --git a/main/manager.c b/main/manager.c index 336f64ff24..e7a8e9078d 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3675,7 +3675,7 @@ static int restrictedFile(const char *filename) { char *stripped_filename; RAII_VAR(char *, path, NULL, ast_free); - RAII_VAR(char *, real_path, NULL, ast_free); + RAII_VAR(char *, real_path, NULL, ast_std_free); if (live_dangerously) { return 0;