bail if ast_calloc fails, this was done before but i accidently removed it when
[asterisk/asterisk.git] / channels / chan_jingle.c
index a5c649e..16bd521 100644 (file)
@@ -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);