Handle failure of ast_calloc when allocating interfaces in res_smdi (issue #7344...
authorJoshua Colp <jcolp@digium.com>
Fri, 16 Jun 2006 16:30:42 +0000 (16:30 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 16 Jun 2006 16:30:42 +0000 (16:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_smdi.c

index 8e12f89..324556e 100644 (file)
@@ -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);