From f717cd2719b51a104e885eef22bfdafd248754ce Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 16 May 2005 17:54:55 +0000 Subject: [PATCH] fix mem leak with MYSQL_USERS (bug #4287) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5703 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a62c2242f7..02571734d4 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1643,6 +1643,10 @@ static int update_user_counter(struct sip_pvt *fup, int event) ast_log(LOG_ERROR, "update_user_counter(%s,%d) called with no event!\n",u->name,event); } ast_mutex_unlock(&userl.lock); +#ifdef MYSQL_USERS + if (u && u->temponly) + free(u); +#endif return 0; }