Fix possible bug
authorDale Weiler <killfieldengine@gmail.com>
Sat, 13 Apr 2013 18:04:07 +0000 (18:04 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 13 Apr 2013 18:04:07 +0000 (18:04 +0000)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index 2337d5a289792b8a00bce4622575cf08831a9d45..6a5e9a1afa9917ef594ac7d2df190dd6bc574991 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -471,7 +471,7 @@ static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
 
 static bool ftepp_define(ftepp_t *ftepp)
 {
-    ppmacro *macro;
+    ppmacro *macro = NULL;
     size_t l = ftepp_ctx(ftepp).line;
 
     (void)ftepp_next(ftepp);
@@ -520,7 +520,7 @@ static bool ftepp_define(ftepp_t *ftepp)
     return true;
 
 cleanup_false:
-    ppmacro_delete(macro);
+    if (macro) ppmacro_delete(macro);
     return false;
 }