Fix memory leak with SIP friends (bug #1010)
authorMark Spencer <markster@digium.com>
Mon, 9 Feb 2004 06:09:45 +0000 (06:09 +0000)
committerMark Spencer <markster@digium.com>
Mon, 9 Feb 2004 06:09:45 +0000 (06:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f97700c..45a3da0 100755 (executable)
@@ -761,6 +761,8 @@ static struct sip_peer *mysql_peer(char *peer, struct sockaddr_in *sin)
                                if ((nowtime - regseconds) > default_expiry) 
                                        memset(&p->addr, 0, sizeof(p->addr));
                        }
+                       mysql_free_result(result);
+                       result = NULL;
                }
                ast_mutex_unlock(&mysqllock);
        }