Commit Diff


commit - 125ca675f07f91d5b8713dbc4ba8c2ef7bf70914
commit + f03e60a991b6bf54e115e3d187aede52f52ef56c
blob - cc06209b1e8c52eb8460afa45b05725c2650d9e2
blob + 8cb8b818f4c6074b02022a654a94701232e3456b
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -1069,6 +1069,9 @@ gotweb_load_got_path(struct repo_dir **rp, const char 
 	DIR *dt;
 	char *dir_test;
 
+	if (dir == NULL)
+		return got_error(GOT_ERR_NOT_GIT_REPO);
+
 	*rp = calloc(1, sizeof(**rp));
 	if (*rp == NULL)
 		return got_error_from_errno("calloc");