Merged revisions 93949 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 19 Dec 2007 17:13:06 +0000 (17:13 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 19 Dec 2007 17:13:06 +0000 (17:13 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93949 | tilghman | 2007-12-19 11:04:13 -0600 (Wed, 19 Dec 2007) | 3 lines

Avoid segfault in chan_iax when peer isn't defined
(Closes issue #11602)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93952 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 7f0bf1a..528c10c 100644 (file)
@@ -2964,7 +2964,7 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
                        }
                }
        }
-       if (!var) { /* Last ditch effort */
+       if (!var && peername) { /* Last ditch effort */
                var = ast_load_realtime("iaxpeers", "name", peername, NULL);
                /*!\note
                 * If this one loaded something, then we need to ensure that the host