Fix memory leak when a corrupted message is found.

As a bonus, this also reduces the code in size a bit.

Bug found by cppcheck.
Remove redundant free.

By definition this would always be null, and while that has no effect, it is,
at best, misleading.