From 31c51899742c10f03a7767dfa2304b17867bdfd4 Mon Sep 17 00:00:00 2001
From: "Sven M. Hallberg" <pesco@khjk.org>
Date: Sat, 11 May 2013 22:21:30 +0200
Subject: [PATCH] call previous backend's free function in h_compile

---
 src/hammer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/hammer.c b/src/hammer.c
index 4f8f966a..2de2cdce 100644
--- a/src/hammer.c
+++ b/src/hammer.c
@@ -86,6 +86,7 @@ int h_compile(HParser* parser, HParserBackend backend, const void* params) {
 }
 
 int h_compile__m(HAllocator* mm__, HParser* parser, HParserBackend backend, const void* params) {
+  backends[backend]->free(parser);
   int ret = backends[backend]->compile(mm__, parser, params);
   if (!ret)
     parser->backend = backend;
-- 
GitLab