]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
don't call ftepp_finish on a freed ftepp struct
authorWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 09:36:45 +0000 (11:36 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 09:36:45 +0000 (11:36 +0200)
main.c

diff --git a/main.c b/main.c
index d89ed27b043efcb62d9f350f34ff385d67ddd456..0a22b1bada1716cdf55a6d389f71dd9294a27701 100644 (file)
--- a/main.c
+++ b/main.c
@@ -765,6 +765,7 @@ srcdone:
         }
 
         ftepp_finish(ftepp);
+        ftepp = NULL;
         if (!OPTS_OPTION_BOOL(OPTION_PP_ONLY)) {
             if (!parser_finish(parser, OPTS_OPTION_STR(OPTION_OUTPUT))) {
                 retval = 1;
@@ -786,7 +787,8 @@ srcdone:
 
 cleanup:
     util_debug("COM", "cleaning ...\n");
-    ftepp_finish(ftepp);
+    if (ftepp)
+        ftepp_finish(ftepp);
     con_close();
     vec_free(items);
     vec_free(ppems);