diff --git a/res/res_smdi.c b/res/res_smdi.c
index 8e12f89c3d48c159a2c0b32899247b1976f46ed8..324556e4068b107080854a6cd6a36d1b7627e419 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);