]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_phoneprov_provider: Fix leaked OBJ_MULTIPLE iterator.
authorCorey Farrell <git@cfware.com>
Sun, 5 Apr 2015 12:53:47 +0000 (12:53 +0000)
committerCorey Farrell <git@cfware.com>
Sun, 5 Apr 2015 12:53:47 +0000 (12:53 +0000)
res_pjsip_phoneprov_provider was using ao2_callback with OBJ_MULTIPLE, then
ignoring the return.  Added OBJ_NODATA flag to prevent a reference leak.

ASTERISK-24935 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4578/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433996 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_phoneprov_provider.c

index 70dd99e067bab2920a6c0e5878806e6f28bd6304..656fdd2956a327fe12b08c7726c5d9e98e2dd635 100644 (file)
@@ -353,7 +353,7 @@ static int load_users(void)
                return 0;
        }
 
-       ao2_callback(users, OBJ_MULTIPLE, users_apply_handler, sorcery);
+       ao2_callback(users, OBJ_MULTIPLE | OBJ_NODATA, users_apply_handler, sorcery);
        ao2_ref(users, -1);
 
        return 0;