X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fdiscovery.c;h=d82f48b74d1a798a702484f96e0386eab914eec8;hb=76c7550c8ab0e9c0ee14a9c396baa008cfb9bc42;hp=885b2bfd3361cf8cbc48c8941479e0d57893d634;hpb=196806f90f40fcc0cf727abd4bed6bc5aefff5ff;p=meshlink diff --git a/src/discovery.c b/src/discovery.c index 885b2bfd..d82f48b7 100644 --- a/src/discovery.c +++ b/src/discovery.c @@ -463,7 +463,7 @@ bool discovery_start(meshlink_handle_t *mesh) { // Start the discovery thread if(pthread_create(&mesh->discovery_thread, NULL, discovery_loop, mesh) != 0) { logger(mesh, MESHLINK_ERROR, "Could not start discovery thread: %s\n", strerror(errno)); - memset(&mesh->discovery_thread, 0, sizeof mesh->discovery_thread); + memset(&mesh->discovery_thread, 0, sizeof(mesh)->discovery_thread); goto fail; }