Fix memory leaks in cadet tests
authorDavid Barksdale <amatus@amat.us>
Tue, 2 Jan 2018 00:54:29 +0000 (18:54 -0600)
committerDavid Barksdale <amatus@amat.us>
Tue, 2 Jan 2018 00:59:06 +0000 (18:59 -0600)
src/cadet/cadet_test_lib.c
src/cadet/test_cadet.c

index 1df6bff0dfdee7655318d3ed36e68c6a6f203653..20ef028b225258b82b183305f6dc2b35941a8fdd 100644 (file)
@@ -241,6 +241,7 @@ GNUNET_CADET_TEST_cleanup (struct GNUNET_CADET_TEST_Context *ctx)
   }
   GNUNET_free (ctx->ops);
   GNUNET_free (ctx->cadets);
+  GNUNET_free (ctx->handlers);
   GNUNET_free (ctx);
   GNUNET_SCHEDULER_shutdown ();
 }
index 5cc9706d7cb0acd8c4d20fee403a098a51d27706..b9f177652c07e3055f3a0869afa17b1cdd47e0b8 100644 (file)
@@ -828,6 +828,7 @@ disconnect_handler (void *cls,
         GNUNET_SCHEDULER_add_now (&gather_stats_and_exit,
                                  (void *) __LINE__);
   }
+  GNUNET_free (ch_w);
 }