Fix memory leaks found by valgrind.
[tinc] / src / net_setup.c
index 5d4e915..00273cf 100644 (file)
@@ -680,6 +680,8 @@ static bool setup_myself(void) {
                return false;
        }
 
+       free(cipher);
+
        regenerate_key();
 
        /* Check if we want to use message authentication codes... */
@@ -700,6 +702,8 @@ static bool setup_myself(void) {
                return false;
        }
 
+       free(digest);
+
        /* Compression */
 
        if(get_config_int(lookup_config(config_tree, "Compression"), &myself->incompression)) {