tests: fix leaks in option-context test