From: Fletcher T. Penney Date: Sat, 15 Apr 2017 23:27:02 +0000 (-0400) Subject: FIXED: Fix memory leak X-Git-Tag: 6.0.5^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bd26ede3255ac12ce5eac9e183877c3e807d4ff;p=multimarkdown FIXED: Fix memory leak --- diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index 85d5943..8dcefa1 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -1037,11 +1037,11 @@ footnote * footnote_new(const char * source, token * label, token * content, boo void footnote_free(footnote * f) { if (f) { if (f->free_para) { - // I'm not sure why, but the following causes a memory error. - // Strangely, not freeing it does *not* seem to cause memory - // leaks?? - - //free(f->content); +#ifdef kUseObjectPool + // Nothing to do here +#else + free(f->content); +#endif } free(f->clean_text); free(f->label_text);