Fixed all warnings from tests.
Removed wrong call to zfree that caused a segfault.