Be on the safe side with initialisation of c->name.
[tinc] / src / protocol_auth.c
index 214d4dd..05f547f 100644 (file)
@@ -76,8 +76,11 @@ bool id_h(connection_t *c)
                                   c->name);
                        return false;
                }
-       } else
+       } else {
+               if(c->name)
+                       free(c->name);
                c->name = xstrdup(name);
+       }
 
        /* Check if version matches */