enca: fix memory leak