avstring-test: fix memory leaks