tests: fix leak in test-string-input-visitor