mirror of https://github.com/asterisk/asterisk
local_ast_moh_start() returns -1 from the answeredonly check without releasing the mohclass reference it holds, unlike every other exit path in the function. Nothing else ever releases that reference, so moh_class_destructor() never runs for the object. With realtime music on hold and cachertclasses disabled, each suppressed request leaks the class object, its monitor thread, the external application process and two file descriptors for the lifetime of Asterisk. For static classes the stale references prevent the class from ever being destroyed after it is replaced by a reload. Release the reference before returning, matching the other exit paths. Fixes: #205123
parent
e5395878d8
commit
b899dea7e0
Loading…
Reference in new issue