manager.c: Fix regression due to using wrong free function.

Commit 424be34563 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
This commit is contained in:
Naveen Albert
2023-12-26 17:14:11 +00:00
parent a4f9d885a7
commit 3ff081e581

View File

@@ -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;