]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Avoid segfault in chan_iax when peer isn't defined
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 19 Dec 2007 17:04:13 +0000 (17:04 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 19 Dec 2007 17:04:13 +0000 (17:04 +0000)
(Closes issue #11602)

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

channels/chan_iax2.c

index 75ac2dfbe9c8859e4abadcc0b11cc5cbcb084da9..66f20f0975aef013ec6919272ee1960bc472f444 100644 (file)
@@ -2696,7 +2696,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