[asterisk-users] "CBAnn" channel not going away in Asterisk 12

Richard Kenner kenner at gnat.com
Tue May 6 05:45:22 CDT 2014


> Really, I think we're pretty positive there's a ref leak (since
> otherwise, the CBAnn channel would be long gone). If you can get a
> ref debug log and the standard Asterisk DEBUG log showing the
> problem, that would help a lot in finding out what is going on.

I think the bug is in conf_handle_talker_cb.  It calls ao2_find but has no
mechanism to decremement the refcount.  It appears that the following is
the best fix.  I looked at all remaining calls to ao2_find in app_confbridge.c
and they look OK.  Do you agree with the below fix?

*** app_confbridge.c.bug        2014-05-06 06:42:21.000000000 -0400
--- app_confbridge.c    2014-05-06 06:42:05.000000000 -0400
*************** static int conf_handle_talker_cb(struct 
*** 1461,1467 ****
        struct pvt_talker_cb *pvt = hook_pvt;
        const char *conf_name = pvt->conf_name;
!       struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
        struct ast_json *talking_extras;
  
        if (!conference) {
                /* Remove the hook since the conference does not exist. */
--- 1461,1468 ----
        struct pvt_talker_cb *pvt = hook_pvt;
        const char *conf_name = pvt->conf_name;
!       RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);
        struct ast_json *talking_extras;
  
+       conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
        if (!conference) {
                /* Remove the hook since the conference does not exist. */



More information about the asterisk-users mailing list