From: Jason Parker Date: Wed, 31 Oct 2007 21:16:20 +0000 (+0000) Subject: Don't try to allocate memory that we're just going to re-allocate later anyways. X-Git-Tag: 1.4.14~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40cd95fc27bca0e9e3bebeb71c10703978541440;p=thirdparty%2Fasterisk.git Don't try to allocate memory that we're just going to re-allocate later anyways. Issue 11130, patch by eliel. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87906 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index c7f3a666fd..e58024ea24 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -1221,9 +1221,6 @@ static int gtalk_add_candidate(struct gtalk *client, ikspak *pak) if(!from) from = c->jid->full; - newcandidate = ast_calloc(1, sizeof(*newcandidate)); - if (!newcandidate) - return 0; for (tmp = client->p; tmp; tmp = tmp->next) { if (iks_find_with_attrib(pak->x, "session", "id", tmp->sid)) { p = tmp;