comparison 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
comparison
equal deleted inserted replaced
38:b156910b59b2 39:337110e7240a
165 macro_define_plain(&cm->where, cm->macro, 165 macro_define_plain(&cm->where, cm->macro,
166 &cm->where2, cm->expansion); 166 &cm->where2, cm->expansion);
167 } else { 167 } else {
168 macro_undef(cm->macro); 168 macro_undef(cm->macro);
169 } 169 }
170 dofree(cm); 170 dofree(cm, sizeof(*cm));
171 } 171 }
172 array_setsize(&commandline_macros, 0); 172 array_setsize(&commandline_macros, 0);
173 } 173 }
174 174
175 static 175 static
285 file_readquote(&cf->where, cf->name); 285 file_readquote(&cf->where, cf->name);
286 mode.do_output = save; 286 mode.do_output = save;
287 } else { 287 } else {
288 file_readquote(&cf->where, cf->name); 288 file_readquote(&cf->where, cf->name);
289 } 289 }
290 dofree(cf); 290 dofree(cf, sizeof(*cf));
291 } 291 }
292 array_setsize(&commandline_files, 0); 292 array_setsize(&commandline_files, 0);
293 } 293 }
294 294
295 //////////////////////////////////////////////////////////// 295 ////////////////////////////////////////////////////////////
924 commandline_macros_cleanup(); 924 commandline_macros_cleanup();
925 incpath_cleanup(); 925 incpath_cleanup();
926 926
927 num = stringarray_num(&freestrings); 927 num = stringarray_num(&freestrings);
928 for (i=0; i<num; i++) { 928 for (i=0; i<num; i++) {
929 dofree(stringarray_get(&freestrings, i)); 929 dostrfree(stringarray_get(&freestrings, i));
930 } 930 }
931 stringarray_setsize(&freestrings, 0); 931 stringarray_setsize(&freestrings, 0);
932 stringarray_cleanup(&freestrings); 932 stringarray_cleanup(&freestrings);
933 } 933 }
934 934