]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix mem leak with MYSQL_USERS (bug #4287)
authorRussell Bryant <russell@russellbryant.com>
Mon, 16 May 2005 17:54:55 +0000 (17:54 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 16 May 2005 17:54:55 +0000 (17:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5703 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a62c2242f7d5d75b14a7162227b137f8d2fa0426..02571734d48dc5dd6b7867d49a0b142d8998aa65 100755 (executable)
@@ -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;
 }