gjtorikian / mtex2MML

A Bison grammar to convert TeX math into MathML.
23 stars 14 forks source link

Memory leaks #27

Closed ptoomey3 closed 9 years ago

ptoomey3 commented 9 years ago

I'm not terribly familiar with the uthash library, but it looks like the way UT_string is being used is leaking memory in several locations. For example, there are a number of places that call ustring_new and never call ustring_free to free the underlying struct:

So, it seems like all of these locations should dupe the char* returned from ustring_body so that the actual UT_string can be freed using ustring_free before the function returns.

ptoomey3 commented 9 years ago

Nice.