dect
/
asterisk
Archived
13
0
Fork 0

Always free cfg file

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1259 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2003-08-04 21:44:48 +00:00
parent a7aaed5162
commit 0502b2ae54
1 changed files with 4 additions and 2 deletions

View File

@ -866,9 +866,12 @@ int init_manager(void)
ast_log(LOG_WARNING, "Unable to change management port / enabled\n");
#endif
}
ast_destroy(cfg);
/* If not enabled, do nothing */
if (!enabled)
if (!enabled) {
return 0;
}
if (asock < 0) {
asock = socket(AF_INET, SOCK_STREAM, 0);
if (asock < 0) {
@ -892,7 +895,6 @@ int init_manager(void)
ast_verbose("Asterisk Management interface listening on port %d\n", portno);
pthread_create(&t, NULL, accept_thread, NULL);
}
ast_destroy(cfg);
return 0;
}