]> git.meshlink.io Git - meshlink/commitdiff
Fix a memory leak.
authorGuus Sliepen <guus@sliepen.org>
Tue, 29 Jul 2014 14:52:21 +0000 (16:52 +0200)
committerGuus Sliepen <guus@sliepen.org>
Tue, 29 Jul 2014 14:52:21 +0000 (16:52 +0200)
src/meshlink.c

index 0f6e5f8c875a60b3eb0c5cd60ee3e49315f73286..f173c8d24e00fa575d562cdcbef1e05026f4eb11 100644 (file)
@@ -515,7 +515,7 @@ static bool finalize_join(meshlink_handle_t *mesh) {
        free(mesh->self->name);
        free(mesh->self->connection->name);
        mesh->self->name = xstrdup(name);
-       mesh->self->connection->name = xstrdup(name);
+       mesh->self->connection->name = name;
 
        fprintf(stderr, "Configuration stored in: %s\n", mesh->confbase);