thingy, which seems moderately cool and has reported a few very
small memory leaks. Now apparently fixed.
git-svn-id: svn://svn.tartarus.org/sgt/halibut@1863
cda61777-01e9-0310-a592-
d414129be87e
* Tidy up
*/
fclose(fp);
- sfree(conf.bullet.text);
+ {
+ int i;
+ sfree(conf.achapter.number_suffix);
+ for (i = 0; i < conf.nasect; i++)
+ sfree(conf.asect[i].number_suffix);
+ sfree(conf.asect);
+ sfree(conf.bullet.text);
+ }
}
/*
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include "halibut.h"
}
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)
}
already = FALSE;
if (t.type == tok_eof)
- return;
+ break;
/*
* Parse code paragraphs separately.
stk_free(parsestk);
addpara(par, ret);
}
+
+ /*
+ * We break to here rather than returning, because otherwise
+ * this cleanup doesn't happen.
+ */
dtor(t);
macrocleanup(macros);
}