[asterisk-commits] mmichelson: branch 1.6.1 r247078 - in /branches/1.6.1: ./ main/utils.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 16 17:46:27 CST 2010


Author: mmichelson
Date: Tue Feb 16 17:46:24 2010
New Revision: 247078

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247078
Log:
Merged revisions 247076 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r247076 | mmichelson | 2010-02-16 17:44:33 -0600 (Tue, 16 Feb 2010) | 12 lines
  
  Add va_end calls to __ast_str_helper.
  
  According to the man page for stdarg(3),
  "Each invocation of va_copy() must be matched by a
  corresponding invocation of va_end() in the same
  function."
  
  There were several cases in __ast_str_helper where
  va_copy was not matched with a corresponding call
  to va_end.
........

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://svnview.digium.com/svn/asterisk/branches/1.6.1/main/utils.c?view=diff&rev=247078&r1=247077&r2=247078
==============================================================================
--- branches/1.6.1/main/utils.c (original)
+++ branches/1.6.1/main/utils.c Tue Feb 16 17:46:24 2010
@@ -1796,6 +1796,7 @@
 			}
 			if (ast_str_make_space(buf, need)) {
 				ast_verbose("failed to extend from %d to %d\n", (int)(*buf)->len, need);
+				va_end(aq);
 				return AST_DYNSTR_BUILD_FAILED;
 			}
 			(*buf)->str[offset] = '\0';	/* Truncate the partial write. */
@@ -1804,6 +1805,7 @@
 			va_end(aq);
 			continue;
 		}
+		va_end(aq);
 		break;
 	} while (1);
 	/* update space used, keep in mind the truncation */




More information about the asterisk-commits mailing list