[PATCH] selftests/media_tests: fix a resource leak