ionalloc: fix memory leak