]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix for bug 7764.
authorMatt O'Gorman <mogorman@digium.com>
Thu, 12 Oct 2006 20:34:49 +0000 (20:34 +0000)
committerMatt O'Gorman <mogorman@digium.com>
Thu, 12 Oct 2006 20:34:49 +0000 (20:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_gtalk.c

index 7ce00c55e7b62336f6fe6768a15915bff454afad..5c40a55a959af7c6e9dd4f481471e4df67b3be1b 100644 (file)
@@ -877,10 +877,11 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const
        if(strchr(tmp->us, '/')) {
                data = ast_strdupa((char *) tmp->us);
                exten = strsep(&data, "/");
-               free(data);
        } else
                exten = tmp->us;
        ast_copy_string(tmp->exten,  exten, sizeof(tmp->exten));
+       if(data)
+               free(data);
        ast_mutex_init(&tmp->lock);
        ast_mutex_lock(&gtalklock);
        tmp->next = client->p;