]> 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:19:40 +0000 (18:19 -0500)
commit1fc4ab38b860b3d526a0eaa40aaea6a2b7881538
tree1ab566f8e76df7025f4e63a5aa7bbfcd9762fc03
parentb90ecc6b31f37f2a21b96982e2b12dd683ecbd05
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