Skip to content

Commit fa3922a

Browse files
manager.c: Fix regression due to using wrong free function.
Commit 424be34 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
1 parent 8c3ecec commit fa3922a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main/manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3763,7 +3763,7 @@ static int restrictedFile(const char *filename)
37633763
{
37643764
char *stripped_filename;
37653765
RAII_VAR(char *, path, NULL, ast_free);
3766-
RAII_VAR(char *, real_path, NULL, ast_free);
3766+
RAII_VAR(char *, real_path, NULL, ast_std_free);
37673767

37683768
if (live_dangerously) {
37693769
return 0;

0 commit comments

Comments
 (0)