From: Russell Bryant Date: Sun, 18 Jun 2006 21:24:35 +0000 (+0000) Subject: bail if ast_calloc fails, this was done before but i accidently removed it when X-Git-Tag: 1.4.0-beta1~857 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f75ad9736a8e2135bfdb10f36c1ef58667797241;p=thirdparty%2Fasterisk.git bail if ast_calloc fails, this was done before but i accidently removed it when moving these allocations so duplicate error messages were not produced (issue #7345) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34663 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index a5c649ec7d..16bd521da2 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -536,6 +536,8 @@ static int jingle_create_candidates(struct jingle *client, struct jingle_pvt *p, } ours1 = ast_calloc(1, sizeof(*ours1)); ours2 = ast_calloc(1, sizeof(*ours2)); + if (!ours1 || !ours2) + goto safeout; iks_insert_node(iq, jingle); iks_insert_node(jingle, candidate);