]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_musiconhold.c: Plug ref leak caused by ao2_replace() misuse.
authorSean Bright <sean.bright@gmail.com>
Mon, 8 Mar 2021 23:16:14 +0000 (18:16 -0500)
committerSean Bright <sean.bright@gmail.com>
Mon, 8 Mar 2021 23:21:29 +0000 (17:21 -0600)
commit16e4d1f36fa6b0a567b0671d7225c1d9473a4c7e
tree3acb1c9ae259f28823efcfb4cde81108c5c9f016
parent90ef6a14a7d75421f6ead90cf6aa1d48b92543fc
res_musiconhold.c: Plug ref leak caused by ao2_replace() misuse.

ao2_replace() bumps the reference count of the object that is doing the
replacing, which is not what we want. We just want to drop the old ref
on the old object and update the pointer to point to the new object.

Pointed out by George Joseph in #asterisk-dev

Change-Id: Ie8167ed3d4b52b9d1ea2d785f885e8c27206743d
res/res_musiconhold.c