diff --git a/test/core/support/spinlock_test.c b/test/core/support/spinlock_test.c index 20b402a7055..c70e76c7ea1 100644 --- a/test/core/support/spinlock_test.c +++ b/test/core/support/spinlock_test.c @@ -70,7 +70,10 @@ static struct test *test_new(int threads, int64_t iterations, int incr_step) { } /* Return pointer to a new struct test. */ -static void test_destroy(struct test *m) { gpr_free(m); } +static void test_destroy(struct test *m) { + gpr_free(m->threads); + gpr_free(m); +} /* Create m->threads threads, each running (*body)(m) */ static void test_create_threads(struct test *m, void (*body)(void *arg)) {