Removed memset in free() was corrupting memory accidentally