From 4066bca40a98ebba0f62aafdffaa6d216dfcd44a Mon Sep 17 00:00:00 2001
From: GeorgyKirichenko <kirichenkoga@gmail.com>
Date: Fri, 16 Jun 2017 09:13:52 +0300
Subject: [PATCH] Fix file leak on error while run recovery

---
 src/box/vy_run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/vy_run.c b/src/box/vy_run.c
index cf287f5d4a..40dd19e535 100644
--- a/src/box/vy_run.c
+++ b/src/box/vy_run.c
@@ -1879,7 +1879,7 @@ vy_run_recover(struct vy_run *run, const char *dir,
 		diag_set(ClientError, ER_INVALID_INDEX_FILE, path,
 			 tt_sprintf("Wrong xrow type (expected %d, got %u)",
 				    VY_INDEX_RUN_INFO, (unsigned)xrow.type));
-		return -1;
+		goto fail_close;
 	}
 	if (vy_run_info_decode(&run->info, &xrow, path) != 0)
 		goto fail_close;
-- 
GitLab