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: #205122
parent
7bd3e76cda
commit
ecef8fb208
Loading…
Reference in new issue