diff --git a/test/core/slice/b64_encode_fuzzer.cc b/test/core/slice/b64_encode_fuzzer.cc index bc4f4a9bf55..f5161ee09ae 100644 --- a/test/core/slice/b64_encode_fuzzer.cc +++ b/test/core/slice/b64_encode_fuzzer.cc @@ -20,6 +20,7 @@ #include #include "src/core/lib/slice/b64.h" +#include "include/grpc/support/alloc.h" bool squelch = true; bool leak_check = true; @@ -28,7 +29,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (size < 2) return 0; const bool url_safe = static_cast(0x100) < data[0]; const bool multiline = static_cast(0x100) < data[1]; - grpc_base64_encode(reinterpret_cast(data + 2), size - 2, - url_safe, multiline); + char* res = grpc_base64_encode(reinterpret_cast(data + 2), + size - 2, url_safe, multiline); + gpr_free(res); return 0; }