commit febee0fd3632e7a5830fb9853b4ceecdebd07f68 from: Omar Polo date: Fri Aug 09 12:46:08 2024 UTC revert got_object_qid_alloc_partial calloc change This reverts parts of be12ea2c34 and 4239df3cca. The fileindex and worktree code has been fixed and this workaround is no longer needed. ok stsp@ commit - 6c7991e2c2cc8ba244e56dd8542d99dedd2e4eb7 commit + febee0fd3632e7a5830fb9853b4ceecdebd07f68 blob - c079c5e221939a0486ad03cbb7d76fad283d376f blob + e4574472a88375bfac44ed049b2e5050ad77a389 --- lib/object_qid.c +++ lib/object_qid.c @@ -31,16 +31,9 @@ const struct got_error * got_object_qid_alloc_partial(struct got_object_qid **qid) { - /* - * XXX(op) this should really be malloc(), but there are - * strange interactions in the fileindex and worktree code - * that are creating issues with some of the changes needed - * for sha256 support. This will have to be revisited once - * that code is fixed. - */ - *qid = calloc(1, sizeof(**qid)); + *qid = malloc(sizeof(**qid)); if (*qid == NULL) - return got_error_from_errno("calloc"); + return got_error_from_errno("malloc"); (*qid)->data = NULL; return NULL;