UBIFS: fix memory leak on error path