beterraba

commit 217121a72bb765bf9e2617bc6d30342ff5724d71

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

beterraba/parse: introduce a finish method to free servdef resources

 beterraba/parse.ha | 9 +++++++++


diff --git a/beterraba/parse.ha b/beterraba/parse.ha
index d5df10f16d48dfea8cd41192fea1e2aa13fb4f99..11d6d9d9a2be0350c3ecce5120862fa9ffd8ffc5 100644
--- a/beterraba/parse.ha
+++ b/beterraba/parse.ha
@@ -59,3 +59,12 @@ 	};
 
 	return definition;
 };
+
+// Frees resources associated with this service definition
+export fn finish(s: *servdef) void = {
+	free(s.name);
+	free(s.desc);
+	free(s.cmd);
+	free(s.reloadcmd);
+	free(s.wd);
+};