X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnames.c;h=4f543c921242a7b345f12a715064088a4a308f48;hb=8156f3760973c17256a93ab48016b8b84f5444de;hp=6db364e0f5c05c6c5eaea3c733747d71a6a60e11;hpb=f6e87ab476a0faf8b124ecaaa27f967d825e6457;p=tinc diff --git a/src/names.c b/src/names.c index 6db364e0..4f543c92 100644 --- a/src/names.c +++ b/src/names.c @@ -1,7 +1,7 @@ /* names.c -- generate commonly used (file)names Copyright (C) 1998-2005 Ivo Timmermans - 2000-2017 Guus Sliepen + 2000-2018 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,6 +50,8 @@ void make_names(bool daemon) { logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter..."); } + free(identname); + if(netname) { xasprintf(&identname, "tinc.%s", netname); } else { @@ -93,6 +95,7 @@ void make_names(bool daemon) { } #ifdef HAVE_MINGW + (void)daemon; if(!logfilename) { xasprintf(&logfilename, "%s" SLASH "log", confbase);