tests: fix leaks in test-io-channel-command