Commit 5c2f57614e2b4b5709e31c3f42bff271ce5189ea

Stefan Sperling 2018-09-19T15:53:10

fix git repository detection segv bug

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/repository.c b/lib/repository.c
index 4f6a28e..d45495d 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -381,7 +381,7 @@ got_repo_open(struct got_repository **repop, const char *path)
 	} while (path);
 done:
 	if (err)
-		err = got_repo_close(repo);
+		got_repo_close(repo);
 	else
 		*repop = repo;
 	free(abspath);