From: Russell Bryant Date: Mon, 16 May 2005 17:54:55 +0000 (+0000) Subject: fix mem leak with MYSQL_USERS (bug #4287) X-Git-Tag: 1.0.11.1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f717cd2719b51a104e885eef22bfdafd248754ce;p=thirdparty%2Fasterisk.git 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 --- 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; }