tests: Fix some memory leaks
tests: Fix some memory leaks

This is enough to make many of the tests pass under gcc's
AddressSanitizer. pixbuf-randomly-modified still fails when it cannot
allocate more memory, and pixbuf-fail fails with memory allocation
errors unless run with ASAN_OPTIONS=allocator_may_return_null=1.

Signed-off-by: Simon McVittie <0e1aea601907c1a85c2dc96e5ea37e23c58d2e9b@debian.org>

GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf,GNOME/gdk-pixbuf