From 877a8fa5d4a8e927982a2b31b96eec86dc188e43 Mon Sep 17 00:00:00 2001 From: Gabriel Zachmann Date: Wed, 19 Jun 2019 10:03:21 +0200 Subject: [PATCH] replace calls to free with cjose_get_dealloc() in _cjose_jws_build_hdr --- src/jws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jws.c b/src/jws.c index 4e03554..88038e4 100644 --- a/src/jws.c +++ b/src/jws.c @@ -59,10 +59,10 @@ static bool _cjose_jws_build_hdr(cjose_jws_t *jws, cjose_header_t *header, cjose } if (!cjose_base64url_encode((const uint8_t *)hdr_str, strlen(hdr_str), &jws->hdr_b64u, &jws->hdr_b64u_len, err)) { - free(hdr_str); + cjose_get_dealloc()(hdr_str); return false; } - free(hdr_str); + cjose_get_dealloc()(hdr_str); return true; }