]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_sorcery_realtime.c: Fix crash from NULL sorcery object type. 99/1699/1
authorRichard Mudgett <rmudgett@digium.com>
Mon, 23 Nov 2015 20:27:27 +0000 (14:27 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 23 Nov 2015 20:42:31 +0000 (14:42 -0600)
commitfc45f4040df77fda402a50822f027f870d114913
treee3a29d3019e7aea7282356fef9fbd22253408ecd
parent25332911fe9cfc69ce89ccbf1622f5adeb987e13
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
res/res_sorcery_realtime.c