diff options
author | Craig Tiller <ctiller@google.com> | 2017-02-27 15:57:24 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-02-27 15:57:24 -0800 |
commit | b73ad23bd82b69e21a2ce6a2f8b422ab99570b19 (patch) | |
tree | fcc36b276df8b8e9c8c0b1b1bb8f0f857a68ff4e /test/core | |
parent | a10f00c711c785538c331b8a44dde75615ef0893 (diff) |
Fix memory leak
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/support/spinlock_test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/core/support/spinlock_test.c b/test/core/support/spinlock_test.c index 20b402a705..c70e76c7ea 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)) { |