diff options
Diffstat (limited to 'xlators/features/bit-rot/src')
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot-scrub.c | 5 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c index 8e432aee645..e2665acab98 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c @@ -127,7 +127,7 @@ bitd_scrub_post_compute_check (xlator_t *this, } signlen = signptr->signaturelen; - *signature = GF_CALLOC (1, sizeof (br_isignature_out_t) + signlen, + *signature = GF_MALLOC (sizeof (br_isignature_out_t) + signlen, gf_common_mt_char); (void) memcpy (*signature, signptr, @@ -389,8 +389,7 @@ br_scrubber_scrub_begin (xlator_t *this, struct br_fsscan_entry *fsentry) goto unrefd; /* skip this object */ /* if all's good, proceed to calculate the hash */ - md = GF_CALLOC (SHA256_DIGEST_LENGTH, sizeof (*md), - gf_common_mt_char); + md = GF_MALLOC (SHA256_DIGEST_LENGTH, gf_common_mt_char); if (!md) goto unrefd; diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c index 66e58948fa9..cf59232263b 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot.c @@ -393,7 +393,7 @@ br_object_read_sign (inode_t *linked_inode, fd_t *fd, br_object_t *object, this = object->this; - md = GF_CALLOC (SHA256_DIGEST_LENGTH, sizeof (*md), gf_common_mt_char); + md = GF_MALLOC (SHA256_DIGEST_LENGTH, gf_common_mt_char); if (!md) { gf_msg (this->name, GF_LOG_ERROR, ENOMEM, BRB_MSG_NO_MEMORY, "failed to allocate memory for saving hash of the " |