Commit Diff


commit - ea827802c0280cb0d5539553eabb137f990fb926
commit + da3a2e80620226ae030a658f2034613a1d8debc9
blob - 3717110f5337e4659153cce6010a8b8709da0104
blob + 101bba534b1ae3ad47fbd0e0a4f80c189fb8e4ec
--- 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 *