diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c
index e9adcf34c79c01dfd1dc123db364d2f9e4d11fef..5b836fefc38e43245e9aebbd1b2d1f04351cceac 100644
--- a/test/core/bad_client/bad_client.c
+++ b/test/core/bad_client/bad_client.c
@@ -41,6 +41,7 @@
 #include "src/core/support/string.h"
 #include "src/core/transport/chttp2_transport.h"
 
+#include <grpc/support/alloc.h>
 #include <grpc/support/sync.h>
 #include <grpc/support/thd.h>
 
@@ -89,6 +90,8 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
   /* Add a debug log */
   gpr_log(GPR_INFO, "TEST: %s", hex);
 
+  gpr_free(hex);
+
   /* Init grpc */
   grpc_init();