From 624b02584f18bdba926ad9791581d5a5b9476b0f Mon Sep 17 00:00:00 2001 From: HimbeerserverDE Date: Sun, 10 Oct 2021 14:52:26 +0200 Subject: [PATCH] Fix memory leak in clt_func --- cs_example.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cs_example.c b/cs_example.c index 8ca09c8..ca4472c 100644 --- a/cs_example.c +++ b/cs_example.c @@ -67,10 +67,12 @@ static void *clt_func(__attribute((unused)) void *unused) CompressedBlob blob = malloc(sizeof *blob); blob->siz = 2; blob->data = (u8 *) "\x0d\xba"; + dragonnet_peer_send_PingPacket(p, &(PingPacket) { .compr_blob = blob }); + free(blob); return NULL; } -- 2.44.0