liblouis / liblouis

Open-source braille translator and back-translator.
http://liblouis.io
GNU Lesser General Public License v2.1
260 stars 209 forks source link

memory leak in resolveSubtable and defaultTableResolver #1

Closed egli closed 10 years ago

egli commented 10 years ago

I ran valgrind on the svn version of liblouis and lo and behold it reported some memory leaks (in Berts new table resolver code of all places). The analysis is straight forward once you see the problem: we have a strdup in a loop and overwrite the existing reference to it

for (subTable = strdup (tableList); ; subTable = cp + 1)

I guess there needs to be a call to free after the sprintf.

egli commented 10 years ago

Duplicate of #2