tests: fix a memory leak revealed by libsolv commit 0804020.