diff main.c @ 38:b156910b59b2

Wrap free() in dofree() to allow instrumenting it for debugging.
author David A. Holland
date Sat, 30 Mar 2013 21:02:25 -0400
parents 70902cac4170
children 337110e7240a
line wrap: on
line diff
--- a/main.c	Sat Mar 30 20:52:59 2013 -0400
+++ b/main.c	Sat Mar 30 21:02:25 2013 -0400
@@ -167,7 +167,7 @@
 		} else {
 			macro_undef(cm->macro);
 		}
-		free(cm);
+		dofree(cm);
 	}
 	array_setsize(&commandline_macros, 0);
 }
@@ -287,7 +287,7 @@
 		} else {
 			file_readquote(&cf->where, cf->name);
 		}
-		free(cf);
+		dofree(cf);
 	}
 	array_setsize(&commandline_files, 0);
 }
@@ -926,7 +926,7 @@
 
 	num = stringarray_num(&freestrings);
 	for (i=0; i<num; i++) {
-		free(stringarray_get(&freestrings, i));
+		dofree(stringarray_get(&freestrings, i));
 	}
 	stringarray_setsize(&freestrings, 0);
 	stringarray_cleanup(&freestrings);