diff files.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 76c114899f63
children 337110e7240a
line wrap: on
line diff
--- a/files.c	Sat Mar 30 20:52:59 2013 -0400
+++ b/files.c	Sat Mar 30 21:02:25 2013 -0400
@@ -70,7 +70,7 @@
 void
 incdir_destroy(struct incdir *id)
 {
-	free(id);
+	dofree(id);
 }
 
 void
@@ -242,7 +242,7 @@
 	if (toplevel) {
 		directive_goteof(&linestartplace);
 	}
-	free(buf);
+	dofree(buf);
 }
 
 ////////////////////////////////////////////////////////////
@@ -308,11 +308,11 @@
 		if (fd >= 0) {
 			pf = place_addfile(place, file, id->issystem);
 			file_read(pf, fd, file, false);
-			free(file);
+			dofree(file);
 			close(fd);
 			return;
 		}
-		free(file);
+		dofree(file);
 	}
 	complain(place, "Include file %s not found", name);
 	complain_fail();