Fix some "make distcheck" errors.
[tinc] / src / tincd.c
index db6b213..5b6b329 100644 (file)
@@ -658,8 +658,6 @@ int main(int argc, char **argv) {
                return 1;
        }
 
-       make_names();
-
        if(show_version) {
                printf("%s version %s\n", PACKAGE, VERSION);
                printf("Copyright (C) 1998-2017 Ivo Timmermans, Guus Sliepen and others.\n"
@@ -676,6 +674,8 @@ int main(int argc, char **argv) {
                return 0;
        }
 
+       make_names();
+
        if(kill_tincd) {
                return !kill_other(kill_tincd);
        }
@@ -821,14 +821,8 @@ end:
        free(priority);
 
        EVP_cleanup();
-       ENGINE_cleanup();
-       CRYPTO_cleanup_all_ex_data();
-#ifdef HAVE_ERR_REMOVE_STATE
-       // OpenSSL claims this function was deprecated in 1.0.0,
-       // but valgrind's leak detector shows you still need to call it to make sure OpenSSL cleans up properly.
-       ERR_remove_state(0);
-#endif
        ERR_free_strings();
+       ENGINE_cleanup();
 
        exit_configuration(&config_tree);
        list_delete_list(cmdline_conf);