From c7d9517eaca81ff4e0becf84504d75cbccc5190e Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 9 Dec 2004 13:23:26 +0000 Subject: [PATCH] - Fixed some errors. No more memory leaks. --- src/binding.c | 6 ++++++ src/memory.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/binding.c b/src/binding.c index fa96069..46a43a1 100644 --- a/src/binding.c +++ b/src/binding.c @@ -22,6 +22,12 @@ int graph_uordblks = 0; extern Protocol INTRUDER; // The intruder protocol extern Role I_M; // special role; precedes all other events always +/* + * Forward declarations + */ + +void goal_graph_destroy (); + /* * * Assist stuff diff --git a/src/memory.h b/src/memory.h index a7a3039..6ff766c 100644 --- a/src/memory.h +++ b/src/memory.h @@ -11,6 +11,7 @@ void memDone (); #define memFree(p,t) free(p) #define memRealloc(p,t) realloc(p,t); +#ifdef DEBUG #define findLoserBegin(ign) int mem_before; \ int mem_diff; \ static int mem_errorcount = 0; \ @@ -26,5 +27,9 @@ void memDone (); if (mem_errorcount >= 1) \ error ("More than enough leaks."); \ } +#else +#define findLoserBegin(ign) ; +#define findLoserEnd(ign,t) ; +#endif #endif