Merged revisions 112820 via svnmerge from
authorPhilippe Sultan <philippe.sultan@gmail.com>
Fri, 4 Apr 2008 19:28:49 +0000 (19:28 +0000)
committerPhilippe Sultan <philippe.sultan@gmail.com>
Fri, 4 Apr 2008 19:28:49 +0000 (19:28 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112820 | phsultan | 2008-04-04 21:26:15 +0200 (Fri, 04 Apr 2008) | 1 line

Free newly allocated channel before returning
........

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

channels/chan_gtalk.c

index 762f5d4..fb58aa4 100644 (file)
@@ -1177,10 +1177,11 @@ static int gtalk_newcall(struct gtalk *client, ikspak *pak)
                ast_log(LOG_WARNING, "Capabilities don't match : us - %s, peer - %s, combined - %s \n", ast_getformatname_multiple(s1, BUFSIZ, p->capability),
                        ast_getformatname_multiple(s2, BUFSIZ, p->peercapability),
                        ast_getformatname_multiple(s3, BUFSIZ, p->jointcapability));
                ast_log(LOG_WARNING, "Capabilities don't match : us - %s, peer - %s, combined - %s \n", ast_getformatname_multiple(s1, BUFSIZ, p->capability),
                        ast_getformatname_multiple(s2, BUFSIZ, p->peercapability),
                        ast_getformatname_multiple(s3, BUFSIZ, p->jointcapability));
-                       /* close session if capabilities don't match */
+               /* close session if capabilities don't match */
                gtalk_action(client, p, "reject");
                p->alreadygone = 1;
                gtalk_hangup(chan);
                gtalk_action(client, p, "reject");
                p->alreadygone = 1;
                gtalk_hangup(chan);
+               ast_channel_free(chan);
                return -1;
        }       
 
                return -1;
        }