Just had a play with this newfangled `valgrind' memory debugger
[sgt/halibut] / bk_xhtml.c
index 22173d5..edab934 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include "halibut.h"
 
@@ -675,6 +676,13 @@ void xhtml_backend(paragraph *sourceform, keywordlist *in_keywords,
     }
     ientry->backend_data = NULL;
   }
+  {
+    int i;
+    sfree(conf.fchapter.number_suffix);
+    for (i = 0; i < conf.nfsect; i++)
+      sfree(conf.fsect[i].number_suffix);
+    sfree(conf.fsect);
+  }
 }
 
 static int xhtml_para_level(paragraph *p)