Skip to content
Snippets Groups Projects
Commit b73ad23b authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix memory leak

parent a10f00c7
No related branches found
No related tags found
No related merge requests found
......@@ -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)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment