[asterisk-commits] file: branch 1.6.1 r197540 - in /branches/1.6.1: ./ main/utils.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 28 09:54:30 CDT 2009


Author: file
Date: Thu May 28 09:54:25 2009
New Revision: 197540

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=197540
Log:
Merged revisions 197538 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r197538 | file | 2009-05-28 11:51:43 -0300 (Thu, 28 May 2009) | 5 lines
  
  Fix a bug in stringfields where it did not actually free the pools of memory.
  
  (closes issue #15074)
  Reported by: pj
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/utils.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/utils.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/main/utils.c?view=diff&rev=197540&r1=197539&r2=197540
==============================================================================
--- branches/1.6.1/main/utils.c (original)
+++ branches/1.6.1/main/utils.c Thu May 28 09:54:25 2009
@@ -1530,7 +1530,11 @@
 		return add_string_pool(mgr, pool_head, needed, file, lineno, func);
 	}
 	if (needed < 0) {		/* reset all pools */
-		/* nothing to do */
+		if (*pool_head == NULL) {
+			ast_log(LOG_WARNING, "trying to reset empty pool\n");
+			return -1;
+		}
+		cur = *pool_head;
 	} else {			/* preserve the last pool */
 		if (*pool_head == NULL) {
 			ast_log(LOG_WARNING, "trying to reset empty pool\n");




More information about the asterisk-commits mailing list