]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_mwi.c: Fix MWI subscription memory corruption crash. 03/803/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 26 Jun 2015 23:48:35 +0000 (18:48 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 6 Jul 2015 20:38:15 +0000 (15:38 -0500)
commit0d67e04359505a06409d8211bb0c2b65fe82125f
treed5059fa1c6829f434439ea2c3a30eb3173a9e9d9
parent0422433f4722e6e692b0c84342e048feff344e80
res_pjsip_mwi.c: Fix MWI subscription memory corruption crash.

MWI subscriptions can crash or corrupt memory when using the subscription
datastore to access the MWI subscription object because the datastore is
not holding a reference to the object.

* Give the subscription datastore a ref to the MWI subscription object.
It is unfortunate that the ref causes a circular ref chain that must be
explicitly broken to allow the memory to get released.  The loop is broken
when the subscription is shutdown and if the subscription setup fails.

ASTERISK-25168 #close
Reported by: Carl Fortin

Change-Id: Ice4fa823f138ff10a6c74d280699c41a82836d4f
res/res_pjsip_mwi.c