[asterisk-addons-commits] tilghman: branch 1.6.0 r1044 - /branches/1.6.0/cdr/cdr_addon_mysql.c

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


Author: tilghman
Date: Mon Nov  9 11:29:13 2009
New Revision: 1044

URL: http://svnview.digium.com/svn/asterisk-addons?view=rev&rev=1044
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.0/cdr/cdr_addon_mysql.c

Modified: branches/1.6.0/cdr/cdr_addon_mysql.c
URL: http://svnview.digium.com/svn/asterisk-addons/branches/1.6.0/cdr/cdr_addon_mysql.c?view=diff&rev=1044&r1=1043&r2=1044
==============================================================================
--- branches/1.6.0/cdr/cdr_addon_mysql.c (original)
+++ branches/1.6.0/cdr/cdr_addon_mysql.c Mon Nov  9 11:29:13 2009
@@ -386,16 +386,16 @@
 		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