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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb364fc61f563384645ff6b98779a7dc27032c31;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 --- diff --git a/main/manager.c b/main/manager.c index 37e380ec6e..48231b72f9 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3763,7 +3763,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;