aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:37:43 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2016-03-26 01:37:43 +0100
commit367e5d896b115413f278b239dd63194cb3671c17 (patch)
tree5c8209f289ca8eef4bff21a223fe1b0ad537fdbf /src
parent5d203f514c204083d1d81a804bd64df2d196197a (diff)
Forgot a few callocs.
Diffstat (limited to 'src')
-rw-r--r--src/core/tsi/fake_transport_security.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c
index 86ffa6b83b..85c8ff7a57 100644
--- a/src/core/tsi/fake_transport_security.c
+++ b/src/core/tsi/fake_transport_security.c
@@ -501,7 +501,8 @@ static const tsi_handshaker_vtable handshaker_vtable = {
};
tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
- tsi_fake_handshaker *impl = calloc(1, sizeof(tsi_fake_handshaker));
+ tsi_fake_handshaker *impl = gpr_malloc(sizeof(*impl));
+ memset(impl, 0, sizeof(*impl));
impl->base.vtable = &handshaker_vtable;
impl->is_client = is_client;
impl->result = TSI_HANDSHAKE_IN_PROGRESS;
@@ -517,8 +518,8 @@ tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
tsi_frame_protector *tsi_create_fake_protector(
size_t *max_protected_frame_size) {
- tsi_fake_frame_protector *impl = calloc(1, sizeof(tsi_fake_frame_protector));
- if (impl == NULL) return NULL;
+ tsi_fake_frame_protector *impl = gpr_malloc(sizeof(*impl));
+ memset(impl, 0, sizeof(*impl));
impl->max_frame_size = (max_protected_frame_size == NULL)
? TSI_FAKE_DEFAULT_FRAME_SIZE
: *max_protected_frame_size;