diff main.c @ 39:337110e7240a

Pass the size to free; it makes debug checking easier.
author David A. Holland
date Sat, 30 Mar 2013 21:17:47 -0400
parents b156910b59b2
children f185d1ac4db4
line wrap: on
line diff
--- a/main.c	Sat Mar 30 21:02:25 2013 -0400
+++ b/main.c	Sat Mar 30 21:17:47 2013 -0400
@@ -167,7 +167,7 @@
 		} else {
 			macro_undef(cm->macro);
 		}
-		dofree(cm);
+		dofree(cm, sizeof(*cm));
 	}
 	array_setsize(&commandline_macros, 0);
 }
@@ -287,7 +287,7 @@
 		} else {
 			file_readquote(&cf->where, cf->name);
 		}
-		dofree(cf);
+		dofree(cf, sizeof(*cf));
 	}
 	array_setsize(&commandline_files, 0);
 }
@@ -926,7 +926,7 @@
 
 	num = stringarray_num(&freestrings);
 	for (i=0; i<num; i++) {
-		dofree(stringarray_get(&freestrings, i));
+		dostrfree(stringarray_get(&freestrings, i));
 	}
 	stringarray_setsize(&freestrings, 0);
 	stringarray_cleanup(&freestrings);