astobj2: Fix shutdown order.

When REF_DEBUG and AO2_DEBUG are both enabled we closed the refs log
before we shutdown astobj2_container.  This caused the AO2_DEBUG
container registration container to be reported as a leak.

Change-Id: If9111c4c21c68064b22c546d5d7a41fac430430e
13.24
Corey Farrell 7 years ago
parent 4ddca53164
commit 1f5c2a2d0d

@ -887,8 +887,11 @@ int astobj2_init(void)
}
#endif
ast_register_cleanup(astobj2_cleanup);
if (container_init() != 0) {
fclose(ref_log);
ref_log = NULL;
return -1;
}
@ -896,7 +899,5 @@ int astobj2_init(void)
ast_cli_register_multiple(cli_astobj2, ARRAY_LEN(cli_astobj2));
#endif /* defined(AO2_DEBUG) */
ast_register_cleanup(astobj2_cleanup);
return 0;
}

Loading…
Cancel
Save