diff --git a/src/obiblob.c b/src/obiblob.c index 1547770..66a5c9c 100644 --- a/src/obiblob.c +++ b/src/obiblob.c @@ -32,7 +32,7 @@ Obi_blob_p obi_blob(byte_t* encoded_value, uint8_t element_size, int32_t length_ Obi_blob_p blob; // Allocate the memory for the blob structure - blob = (Obi_blob_p) malloc(sizeof(Obi_blob_t) + length_encoded_value); + blob = (Obi_blob_p) calloc(sizeof(Obi_blob_t) + length_encoded_value, sizeof(byte_t)); if (blob == NULL) { obi_set_errno(OBI_MALLOC_ERROR);