--- asterisk/channels/chan_sip.c 2004-02-07 14:30:31.000000000 +0100 +++ myasterisk/channels/chan_sip.c 2004-02-07 17:52:28.372882776 +0100 @@ -761,6 +761,8 @@ if ((nowtime - regseconds) > default_expiry) memset(&p->addr, 0, sizeof(p->addr)); } + mysql_free_result(result); + result = NULL; } ast_mutex_unlock(&mysqllock); }