Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unconditionally free and zero in binaryBlob::clear()
The function previously conditionally freed a m_memblocks pointer if its corresponding m_headers was valid. This makes me slightly worried about the possibility that memory would be allocated, but the header would still be marked as invalid. I don't see how that could happen, but it's better to be safe than sorry. SDL_free() does a guaranteed NULL pointer check (like most SDL functions), so it's okay to pass NULL pointers to it. Just to be sure, I'm also zeroing m_memblocks and m_headers after freeing everything in the function.
- Loading branch information