[asterisk-commits] branch kpfleming/stringfields - r7764 /team/kpfleming/stringfields/utils.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 3 20:26:17 CST 2006


Author: kpfleming
Date: Tue Jan  3 20:26:16 2006
New Revision: 7764

URL: http://svn.digium.com/view/asterisk?rev=7764&view=rev
Log:
doh!

Modified:
    team/kpfleming/stringfields/utils.c

Modified: team/kpfleming/stringfields/utils.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/stringfields/utils.c?rev=7764&r1=7763&r2=7764&view=diff
==============================================================================
--- team/kpfleming/stringfields/utils.c (original)
+++ team/kpfleming/stringfields/utils.c Tue Jan  3 20:26:16 2006
@@ -952,8 +952,11 @@
 		if (!(new_base = realloc(pool->base, new_size)))
 			return NULL;
 
-		for (index = 0; index < num_fields; index++)
-			fields[index] = new_base + (fields[index] - pool->base);
+		for (index = 0; index < num_fields; index++) {
+			if (fields[index])
+				fields[index] = new_base + (fields[index] - pool->base);
+		}
+
 		pool->base = new_base;
 		pool->space += new_size - pool->size;
 		pool->size = new_size;



More information about the asterisk-commits mailing list