[svn-commits] seanbright: branch 1.6.2 r298346 - in /branches/1.6.2: ./ main/astobj2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 15 21:31:39 UTC 2010


Author: seanbright
Date: Wed Dec 15 15:31:35 2010
New Revision: 298346

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=298346
Log:
Merged revisions 298345 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r298345 | seanbright | 2010-12-15 16:28:29 -0500 (Wed, 15 Dec 2010) | 6 lines
  
  Fix reference and container leaks when running 'astobj2 test.'
  
  We need to make sure that ao2_iterator_destroy is called once for each time that
  ao2_iterator_init is called.  Also make sure to unref a newly allocated object
  that we've linked into a container.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/astobj2.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: branches/1.6.2/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/astobj2.c?view=diff&rev=298346&r1=298345&r2=298346
==============================================================================
--- branches/1.6.2/main/astobj2.c (original)
+++ branches/1.6.2/main/astobj2.c Wed Dec 15 15:31:35 2010
@@ -1095,12 +1095,14 @@
 				ao2_t_unlink(c1, obj,"test");
 			ao2_t_ref(obj, -1,"test");
 		}
+		ao2_iterator_destroy(&ai);
 		ast_cli(a->fd, "testing iterators again\n");
 		ai = ao2_iterator_init(c1, 0);
 		while ( (obj = ao2_t_iterator_next(&ai,"test")) ) {
 			ast_cli(a->fd, "iterator on <%s>\n", obj);
 			ao2_t_ref(obj, -1,"test");
 		}
+		ao2_iterator_destroy(&ai);
 	}
 	ast_cli(a->fd, "testing callbacks again\n");
 	ao2_t_callback(c1, 0, print_cb, &a->fd, "test callback");




More information about the svn-commits mailing list