From: Joshua Colp Date: Fri, 16 Jun 2006 16:30:42 +0000 (+0000) Subject: Handle failure of ast_calloc when allocating interfaces in res_smdi (issue #7344... X-Git-Tag: 1.4.0-beta1~870 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0073f0de9eba3d2a23b4be1fa144aa09d4464758;p=thirdparty%2Fasterisk.git Handle failure of ast_calloc when allocating interfaces in res_smdi (issue #7344 reported by casper) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34495 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_smdi.c b/res/res_smdi.c index 8e12f89c3d..324556e406 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -617,7 +617,8 @@ static int smdi_load(int reload) } } - iface = ast_calloc(1, sizeof(*iface)); + if (!(iface = ast_calloc(1, sizeof(*iface)))) + continue; ASTOBJ_INIT(iface); ASTOBJ_CONTAINER_INIT(&iface->md_q);