]> git.lizzy.rs Git - dragonnet-example.git/blobdiff - cs_example.c
Fix memory leak in clt_func
[dragonnet-example.git] / cs_example.c
index 8ca09c88f8b5e4a649583917ca62c3eaa0cdc9fb..ca4472c409fefa394ef947c55b1ae787ebba0164 100644 (file)
@@ -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;
 }