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; }