]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Return an error of transmit_response is called without a session.
authorRussell Bryant <russell@russellbryant.com>
Tue, 6 Mar 2007 18:01:20 +0000 (18:01 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 6 Mar 2007 18:01:20 +0000 (18:01 +0000)
(issue #9002)

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

channels/chan_skinny.c

index c7e4b5976982e58afed3429cc06d4da4e951a1a6..e1eb8377196693e5181adbe505bebb13f7de23d1 100644 (file)
@@ -1393,6 +1393,12 @@ static int skinny_unregister(struct skinny_req *req, struct skinnysession *s)
 static int transmit_response(struct skinnysession *s, struct skinny_req *req)
 {
        int res = 0;
+
+       if (!s) {
+               ast_log(LOG_WARNING, "Asked to transmit to a non-existant session!\n");
+               return -1;
+       }
+
        ast_mutex_lock(&s->lock);
 
        if (skinnydebug)