Commit Diff


commit - cee6a7ea556f9f3ae0f50df959c2acd8cb59bf80
commit + 876f8c1a29bce31fa6d99470a60be90c724ec4b6
blob - 8ac4c05f841330ae194feac4006bf4573d3e4090
blob + a53f950ac245e3e7b8e892da1d8e80eeb5d13caf
--- lib/privsep.c
+++ lib/privsep.c
@@ -2770,21 +2770,12 @@ got_privsep_send_enumerated_tree(size_t *totlen, struc
 	if (wbuf == NULL)
 		return got_error_from_errno("imsg_create ENUMERATED_TREE");
 
-	if (imsg_add(wbuf, tree_id->sha1, SHA1_DIGEST_LENGTH) == -1) {
-		err = got_error_from_errno("imsg_add ENUMERATED_TREE");
-		ibuf_free(wbuf);
-		return err;
-	}
-	if (imsg_add(wbuf, &nentries, sizeof(nentries)) == -1) {
-		err = got_error_from_errno("imsg_add ENUMERATED_TREE");
-		ibuf_free(wbuf);
-		return err;
-	}
-	if (imsg_add(wbuf, path, path_len) == -1) {
-		err = got_error_from_errno("imsg_add ENUMERATED_TREE");
-		ibuf_free(wbuf);
-		return err;
-	}
+	if (imsg_add(wbuf, tree_id->sha1, SHA1_DIGEST_LENGTH) == -1)
+		return got_error_from_errno("imsg_add ENUMERATED_TREE");
+	if (imsg_add(wbuf, &nentries, sizeof(nentries)) == -1)
+		return got_error_from_errno("imsg_add ENUMERATED_TREE");
+	if (imsg_add(wbuf, path, path_len) == -1)
+		return got_error_from_errno("imsg_add ENUMERATED_TREE");
 
 	wbuf->fd = -1;
 	imsg_close(ibuf, wbuf);