]> git.meshlink.io Git - meshlink/commitdiff
fixed missing unlock
authorNiklas Hofmann <niklas.hofmann@everbase.net>
Sat, 9 Aug 2014 17:34:12 +0000 (19:34 +0200)
committerNiklas Hofmann <niklas.hofmann@everbase.net>
Sat, 9 Aug 2014 17:34:12 +0000 (19:34 +0200)
src/meshlink.c

index d028d4289e0257886bd70035d7253c022d434299..acb4b0fb1802d10c9bbf556bdedbd5591770371b 100644 (file)
@@ -1042,8 +1042,10 @@ void meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh) {
 
        outpacketqueue_t* p = meshlink_queue_pop(&mesh->outpacketqueue);
        if(!p)
+       {
                pthread_mutex_unlock(&(mesh->mesh_mutex));
                return;
+       }
 
        if (sizeof(meshlink_packethdr_t) + p->len > MAXSIZE) {
                pthread_mutex_unlock(&(mesh->mesh_mutex));