Free mysql results
authorMark Spencer <markster@digium.com>
Wed, 11 Feb 2004 06:29:35 +0000 (06:29 +0000)
committerMark Spencer <markster@digium.com>
Wed, 11 Feb 2004 06:29:35 +0000 (06:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2156 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 1b341b9..cbde7d9 100755 (executable)
@@ -1595,6 +1595,8 @@ static struct iax2_peer *mysql_peer(char *peer)
                                if ((nowtime - regseconds) > IAX_DEFAULT_REG_EXPIRE) 
                                        memset(&p->addr, 0, sizeof(p->addr));
                        }
+                       mysql_free_result(result);
+                       result = NULL;
                }
                ast_mutex_unlock(&mysqllock);
        }
@@ -1650,6 +1652,8 @@ static struct iax2_user *mysql_user(char *user)
                                        }
                                }
                        }
+                       mysql_free_result(result);
+                       result = NULL;
                }
                ast_mutex_unlock(&mysqllock);
        }