Commit Diff


commit - 56a9d3151cd30e0b62e13d1469bc2f6b6a24f231
commit + 2bde3e78a5bd6619af838df19eec530e23783c0b
blob - 2109bc13bcb9c7dbfb07021a640c5fa125e74954
blob + f0f625ddad473f4c65fabd04e165b109d87dacb7
--- lib/privsep.c
+++ lib/privsep.c
@@ -3518,7 +3518,7 @@ got_privsep_recv_painted_commits(struct got_object_id_
 		datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
 		if (imsg.hdr.type == GOT_IMSG_COMMIT_PAINTING_DONE) {
 			imsg_free(&imsg);
-			break;
+			return NULL;
 		}
 		if (imsg.hdr.type != GOT_IMSG_PAINTED_COMMITS){
 			imsg_free(&imsg);
@@ -3561,9 +3561,9 @@ got_privsep_recv_painted_commits(struct got_object_id_
 		}
 
 		imsg_free(&imsg);
+		if (err)
+			return err;
 	}
-
-	return err;
 }
 
 const struct got_error *