printf-hook: Avoid double-free when freeing Vstr config
authorTobias Brunner <tobias@strongswan.org>
Wed, 12 Jun 2013 14:13:32 +0000 (16:13 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 21 Jun 2013 15:03:20 +0000 (17:03 +0200)
Thread-specific objects get freed when the thread value object is
destroyed (wasn't the case earlier, i.e. before 2b19dd35), which
may cause the second call to vstr_free_conf() to fail in an assert
in Vstr (depending on how it was built).

src/libstrongswan/utils/printf_hook.c

index 6e51aa4..f030f45 100644 (file)
@@ -474,7 +474,6 @@ METHOD(printf_hook_t, destroy, void,
        /* freeing the Vstr_conf of the main thread */
        vstr_conf->destroy(vstr_conf);
        vstr_conf = NULL;
-       vstr_free_conf(conf);
        vstr_exit();
 #endif
        free(this);