From: Corey Farrell Date: Tue, 7 Oct 2014 21:30:07 +0000 (+0000) Subject: astobj2: Correct REF_DEBUG false leak report X-Git-Tag: 11.14.0-rc1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5454c620e0c8d642898005ba2ca61d95bf8d9ba5;p=thirdparty%2Fasterisk.git astobj2: Correct REF_DEBUG false leak report When ao2_callback is run with OBJ_MULTIPLE and not OBJ_NODATA it allocates a temporary container in a way that does not record REF_DEBUG log entries. This changes that container to correctly record unref's when the container is freed. ASTERISK-24390 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4047/ ........ Merged revisions 424786 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@424787 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/astobj2.c b/main/astobj2.c index 3590d9bf64..6aff3b4ced 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -1027,7 +1027,7 @@ static void *internal_ao2_callback(struct ao2_container *c, enum search_flags fl * is destroyed, the container will be automatically * destroyed as well. */ - multi_container = __ao2_container_alloc(AO2_ALLOC_OPT_LOCK_NOLOCK, 1, NULL, NULL); + multi_container = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_NOLOCK, 1, NULL, NULL); if (!multi_container) { return NULL; }