Don't unreference the SLA object if there is no SLA object in the devicestate callback. (issue #8354 reported by loloski)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2006-11-16 17:52:48 +00:00
parent d1ee29fc20
commit ee182a4b02

View File

@@ -2930,6 +2930,10 @@ static int slastate(const char *data)
/* Find conference */ /* Find conference */
sla = sla2 = ASTOBJ_CONTAINER_FIND(&slas, data); sla = sla2 = ASTOBJ_CONTAINER_FIND(&slas, data);
if (!sla2)
return AST_DEVICE_INVALID;
ASTOBJ_UNREF(sla2, sla_destroy); ASTOBJ_UNREF(sla2, sla_destroy);
ast_log(LOG_DEBUG, "for '%s' conf = %p, sla = %p\n", data, conf, sla); ast_log(LOG_DEBUG, "for '%s' conf = %p, sla = %p\n", data, conf, sla);