mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
manager.c: Fix regression due to using wrong free function.
Commit424be34563
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 commitb9ed57092f
)
This commit is contained in:
committed by
Asterisk Development Team
parent
8a73bac226
commit
c6b82b19a4
@@ -3763,7 +3763,7 @@ static int restrictedFile(const char *filename)
|
|||||||
{
|
{
|
||||||
char *stripped_filename;
|
char *stripped_filename;
|
||||||
RAII_VAR(char *, path, NULL, ast_free);
|
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) {
|
if (live_dangerously) {
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user