egl: fix memory leak ending egl interface