TESTS: fix memory leak.

Signed-off-by: Robin Hack <hack.robin@gmail.com>