mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Ensure that logmsgs are freed properly
Messages sent while the logger thread is shutting down will now have their associated callid freed properly. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@382574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1519,7 +1519,7 @@ static void __attribute__((format(printf, 6, 0))) ast_log_full(int level, const
|
|||||||
AST_LIST_LOCK(&logmsgs);
|
AST_LIST_LOCK(&logmsgs);
|
||||||
if (close_logger_thread) {
|
if (close_logger_thread) {
|
||||||
/* Logger is either closing or closed. We cannot log this message. */
|
/* Logger is either closing or closed. We cannot log this message. */
|
||||||
ast_free(logmsg);
|
logmsg_free(logmsg);
|
||||||
} else {
|
} else {
|
||||||
AST_LIST_INSERT_TAIL(&logmsgs, logmsg, list);
|
AST_LIST_INSERT_TAIL(&logmsgs, logmsg, list);
|
||||||
ast_cond_signal(&logcond);
|
ast_cond_signal(&logcond);
|
||||||
|
|||||||
Reference in New Issue
Block a user