Found by AddressSanitizer.
close(mesh->netns);
}
+ for(vpn_packet_t *packet; (packet = meshlink_queue_pop(&mesh->outpacketqueue));) {
+ free(packet);
+ }
+
+ meshlink_queue_exit(&mesh->outpacketqueue);
+
free(mesh->name);
free(mesh->appname);
free(mesh->confbase);
mesh->self->in_packets++;
mesh->self->in_bytes += packet->len;
route(mesh, mesh->self, packet);
+
+ free(packet);
}
ssize_t meshlink_get_pmtu(meshlink_handle_t *mesh, meshlink_node_t *destination) {
pthread_mutex_init(&queue->mutex, &attr);
}
+static inline void meshlink_queue_exit(meshlink_queue_t *queue) {
+ pthread_mutex_destroy(&queue->mutex);
+}
+
static inline bool meshlink_queue_push(meshlink_queue_t *queue, void *data) {
meshlink_queue_item_t *item = malloc(sizeof(*item));