commit e09adfa5ab72336ded39d57588f963d262893b0e from: Omar Polo via: Thomas Adam date: Sat Aug 10 08:19:09 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 - 24b89c8a5f92f406df9f46c98dffa35168061d28 commit + e09adfa5ab72336ded39d57588f963d262893b0e blob - 48ffcb76649f846cae64faca3924c1b5583714b2 blob + 4908999633fa7889a6f84f36e6fcaa39d08bae03 --- 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;