]> git.meshlink.io Git - meshlink-tiny/commitdiff
Fix a possible crash when opening an ephemeral instance.
authorGuus Sliepen <guus@meshlink.io>
Mon, 12 Jul 2021 19:34:35 +0000 (21:34 +0200)
committerGuus Sliepen <guus@meshlink.io>
Mon, 12 Jul 2021 19:34:35 +0000 (21:34 +0200)
src/meshlink.c

index b69c1619e498beec8a288c3960e4abb9983ddcac..ec8024e58031c829584d4cf117960fa5cad8a58a 100644 (file)
@@ -312,7 +312,9 @@ static bool finalize_join(join_state_t *state, const void *buf, uint16_t len) {
 
        sptps_send_record(&state->sptps, 1, ecdsa_get_public_key(mesh->private_key), 32);
 
-       logger(mesh, MESHLINK_DEBUG, "Configuration stored in: %s\n", mesh->confbase);
+       if(mesh->confbase) {
+               logger(mesh, MESHLINK_DEBUG, "Configuration stored in: %s\n", mesh->confbase);
+       }
 
        return true;
 }