fix seg fault
[asterisk/asterisk.git] / channels / chan_iax2.c
index 2eab458..238f3bf 100755 (executable)
@@ -7876,7 +7876,7 @@ static int peer_set_srcaddr(struct iax2_peer *peer, const char *srcaddr)
                        port = IAX_DEFAULT_PORTNO;
        }
        
                        port = IAX_DEFAULT_PORTNO;
        }
        
-       if (!ast_get_ip(&sin, tmp)) {
+       if (!ast_get_ip(&sin, addr)) {
                struct ast_netsock *sock;
                int res;
 
                struct ast_netsock *sock;
                int res;