summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2006-06-16 16:30:42 +0000
committerJoshua Colp <jcolp@digium.com>2006-06-16 16:30:42 +0000
commit0073f0de9eba3d2a23b4be1fa144aa09d4464758 (patch)
tree68206caf71d5c7b4ea9d6d8e375f53ed0de90302 /res
parent0e5e744fb2813081cc02697a2b341f219fce7c7a (diff)
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
Diffstat (limited to 'res')
-rw-r--r--res/res_smdi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 8e12f89c3..324556e40 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);