Merge pull request #4 from LeSpocky/master

quick fix not freed memory reported in #2 and #3