Fix freeing of unallocated memory.
Merge pull request #335 from upsky/fixFreeingUnallocated

Fix freeing of unallocated memory.
Good Catch !