Summary: | ASTERISK-23420: [patch]Memory leak in manager_add_filter function in manager.c | ||
Reporter: | Etienne Lessard (hexanol) | Labels: | |
Date Opened: | 2014-03-05 11:01:40.000-0600 | Date Closed: | 2014-03-14 16:37:37 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | SVN 11.8.0 12.1.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ( 0) manager_eventfilter_leak | |
Description: | The title says it all.
If you have a section in manager.conf with an eventfilter option, when the manager config is reloaded, then a leak occurs (i.e. the reference to new_filter will never reach 0). It's missing an ao2_ref(new_filter, -1) after the call to ao2_t_link. | ||
Comments: | By: Etienne Lessard (hexanol) 2014-03-05 11:03:18.232-0600 I've attached a patch. By: Matt Jordan (mjordan) 2014-03-05 13:06:17.708-0600 Patch looks correct to me, since the various filters containers own the reference of the thing linked into them. Nice catch! By: Jonathan Rose (jrose) 2014-03-14 16:38:05.993-0500 Patch committed from 11 through trunk. Thanks for the contribution. |