fix allocation/deallocation mismatch
Merge pull request #1 from mscdex/master

fix allocation/deallocation mismatch