mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Memory leaks fix
(closes ASTERISK-22376) Reported by: John Hardin Patches: memleak.patch uploaded by jhardin (license 6512) memleak2.patch uploaded by jhardin (license 6512) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1921,7 +1921,7 @@ static int can_safely_quit(shutdown_nice_t niceness, int restart)
|
||||
static void really_quit(int num, shutdown_nice_t niceness, int restart)
|
||||
{
|
||||
int active_channels;
|
||||
RAII_VAR(struct ast_json *, json_object, NULL, ast_json_unref);
|
||||
struct ast_json *json_object = NULL;
|
||||
int run_cleanups = niceness >= SHUTDOWN_NICE;
|
||||
|
||||
if (run_cleanups) {
|
||||
@@ -1959,6 +1959,8 @@ static void really_quit(int num, shutdown_nice_t niceness, int restart)
|
||||
"Shutdown", active_channels ? "Uncleanly" : "Cleanly",
|
||||
"Restart", restart ? "True" : "False");
|
||||
ast_manager_publish_event("Shutdown", EVENT_FLAG_SYSTEM, json_object);
|
||||
ast_json_unref(json_object);
|
||||
json_object = NULL;
|
||||
}
|
||||
ast_verb(0, "Asterisk %s ending (%d).\n",
|
||||
active_channels ? "uncleanly" : "cleanly", num);
|
||||
|
Reference in New Issue
Block a user