[Libguestfs] [PATCH 3/3] builder: clean the parsing structs on error

Pino Toscano ptoscano at redhat.com
Thu Mar 20 13:48:13 UTC 2014


---
 builder/index-parse.y | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/builder/index-parse.y b/builder/index-parse.y
index 5554e53..9355bd4 100644
--- a/builder/index-parse.y
+++ b/builder/index-parse.y
@@ -90,6 +90,11 @@ typedef void *yyscan_t;
 %parse-param { yyscan_t scanner }
 %parse-param { struct parse_context *context }
 
+%destructor { section_free ($$); } <sections>
+%destructor { section_free ($$); } <section>
+%destructor { field_free ($$); } <fields>
+%destructor { field_free ($$); } <field>
+
 %%
 
 index:
-- 
1.8.3.1




More information about the Libguestfs mailing list