Commit 3809565b92202a502ca949520da8ebdc4a1320e8

Stefan Sperling 2019-05-13T13:09:17

missing error check in apply_unveil()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/got/got.c b/got/got.c
index 1b3478d..f03bfda 100644
--- a/got/got.c
+++ b/got/got.c
@@ -248,7 +248,11 @@ apply_unveil(const char *repo_path, int repo_read_only,
 		error = get_editor(&editor);
 		if (error)
 			return error;
-		unveil(editor, "x");
+		if (unveil(editor, "x") != 0) {
+			error = got_error_from_errno2("unveil", editor);
+			free(editor);
+			return error;
+		}
 		free(editor);
 	}