Commit 8920fa0456335183a231225a79354b3fa592acb8

Stefan Sperling 2019-08-18T14:28:39

fix uninitialized 'editor' variable; found by Hiltjo Posthuma

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/got/got.c b/got/got.c
index de8bc60..eb5fcb7 100644
--- a/got/got.c
+++ b/got/got.c
@@ -238,6 +238,8 @@ get_editor(char **abspath)
 	const struct got_error *err = NULL;
 	const char *editor;
 
+	*abspath = NULL;
+
 	editor = getenv("VISUAL");
 	if (editor == NULL)
 		editor = getenv("EDITOR");