summaryrefslogtreecommitdiff
path: root/res/res_sorcery_realtime.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-11-23 14:27:27 -0600
committerRichard Mudgett <rmudgett@digium.com>2015-11-23 14:46:57 -0600
commit9ca652f1b913607a9ab181a9950d091fc56554f3 (patch)
tree47360d33fd9736c9791810ae55ebfef8595ef37c /res/res_sorcery_realtime.c
parenta4508476d42cf55b04a6b9db4ba993a4d9a4eb69 (diff)
res_sorcery_realtime.c: Fix crash from NULL sorcery object type.
If the sorcery object type is not found a NULL is returned. Unfortunately, sorcery_realtime_filter_objectset() will crash after complaining about not finding the object type and saying to expect errors. * Use ao2_cleanup() instead of ao2_ref() to prevent the crash. ASTERISK-25165 Reported by Corey Farrell Change-Id: Ic3b64453ea3058cb68d5c26d97d4fe7b8eea2e97
Diffstat (limited to 'res/res_sorcery_realtime.c')
-rw-r--r--res/res_sorcery_realtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_sorcery_realtime.c b/res/res_sorcery_realtime.c
index b2df29814..8807c0196 100644
--- a/res/res_sorcery_realtime.c
+++ b/res/res_sorcery_realtime.c
@@ -142,7 +142,7 @@ static struct ast_variable *sorcery_realtime_filter_objectset(struct ast_variabl
}
}
- ao2_ref(object_type, -1);
+ ao2_cleanup(object_type);
return objectset;
}