[asterisk-addons-commits] tilghman: branch 1.6.2 r1046 - /branches/1.6.2/cdr/cdr_addon_mysql.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Mon Nov 9 11:32:26 CST 2009


Author: tilghman
Date: Mon Nov  9 11:32:22 2009
New Revision: 1046

URL: http://svnview.digium.com/svn/asterisk-addons?view=rev&rev=1046
Log:
Merged revision 228798 manually from http://svn.digium.com/svn/asterisk/trunk
...............
  r228798 | tilghman | 2009-11-09 01:37:52 -0500 (Mon, Nov  9 2009) | ?? lines

  Fix various problems detected with Valgrind.
  * cdr_mysql stored a pointer that was freed by realloc()
...............

Modified:
    branches/1.6.2/cdr/cdr_addon_mysql.c

Modified: branches/1.6.2/cdr/cdr_addon_mysql.c
URL: http://svnview.digium.com/svn/asterisk-addons/branches/1.6.2/cdr/cdr_addon_mysql.c?view=diff&rev=1046&r1=1045&r2=1046
==============================================================================
--- branches/1.6.2/cdr/cdr_addon_mysql.c (original)
+++ branches/1.6.2/cdr/cdr_addon_mysql.c Mon Nov  9 11:32:22 2009
@@ -363,15 +363,15 @@
 		return -1;
 	}
 
+	tmp = ast_variable_retrieve(cfg, category, variable);
+
+	ast_str_set(field, 0, "%s", tmp ? tmp : def);
+
 	us->str = *field;
 
 	AST_LIST_LOCK(&unload_strings);
 	AST_LIST_INSERT_HEAD(&unload_strings, us, entry);
 	AST_LIST_UNLOCK(&unload_strings);
-
-	tmp = ast_variable_retrieve(cfg, category, variable);
-
-	ast_str_set(field, 0, "%s", tmp ? tmp : def);
 
 	return 0;
 }




More information about the asterisk-addons-commits mailing list