Commit Diff


commit - 821d9838d55e92c234e8e7ce7ecccc0ec2809a00
commit + 52ba27b372c79f398a374541cae9f306284131c7
blob - 53cbc91e069a115f4cf2a397a5f0747d68241108
blob + 31ee18120e8ff48e759771834ace3e9acff31e30
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -1068,6 +1068,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");