Commit Diff


commit - c932eeeb83c00ba282780d657b539e342d092311
commit + d4592c7c7aa8a7bf2d09aeb096625941be8bd1e3
blob - 3891b670e44a1c9c9bae5b74e45ce25b5e45c72e
blob + 467007950a323a5927f0abb5ad9e5c8d86312e52
--- got/got.c
+++ got/got.c
@@ -2384,6 +2384,10 @@ collect_commit_logmsg(struct got_pathlist_head *commit
 	len = 0;
 
 	fp = fopen(a->logmsg_path, "r");
+	if (fp == NULL) {
+		err = got_error_from_errno("fopen");
+		goto done;
+	}
 	while (fgets(buf, sizeof(buf), fp) != NULL) {
 		if (!content_changed && strcmp(buf, initial_content) != 0)
 			content_changed = 1;