fletcher/MultiMarkdown-4 — pull request #52 by Gabrielh (2014-01-21 18:23:08+00:00)
Title: Fix bug when processing several files in batch mode with latexmode metadata set

If several files are processed in batch mode and one the first files has the latexmode metadata set, multimarkdown will dereference a previously freed pointer, which can make it crash.

When the file with the latexmode metadata is processed, target_meta_key is set to point to this metadata (multimarkdown.c:321) and then freed (multimarkdown.c:329). However, it is not reset to null, so when the next file
is processed, target_meta_key still points to freed metadata and is accessed in extract_metadata_value (multimarkdown.c:304).