From: Automerge script Date: Wed, 1 Nov 2006 22:01:12 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.14-netsec~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ace0f74f273ad3c75ae55830dc09f593025cbcf3;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46844 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/logger.c b/logger.c index 85a75d117c..fcc0797ad1 100644 --- a/logger.c +++ b/logger.c @@ -875,15 +875,19 @@ void ast_verbose(const char *fmt, ...) if (complete) { if (msgcnt < MAX_MSG_QUEUE) { /* Allocate new structure */ - if ((m = malloc(sizeof(*m)))) + if ((m = malloc(sizeof(*m)))) { + m->msg = NULL; msgcnt++; + } } else { /* Recycle the oldest entry */ m = list; list = list->next; - free(m->msg); + if (m->msg) + free(m->msg); } if (m) { + m->msg = NULL; m->msg = strdup(stuff); if (m->msg) { if (last)