deinit() library if integrity check fails
authorMartin Willi <martin@strongswan.org>
Mon, 22 Jun 2009 14:18:53 +0000 (16:18 +0200)
committerMartin Willi <martin@strongswan.org>
Mon, 22 Jun 2009 14:18:53 +0000 (16:18 +0200)
src/charon/daemon.c
src/pluto/plutomain.c

index 166857f..07267cb 100644 (file)
@@ -670,6 +670,7 @@ int main(int argc, char *argv[])
        /* initialize library */
        if (!library_init(STRONGSWAN_CONF))
        {
+               library_deinit();
                exit(-1);
        }
        
index b0710fa..e034967 100644 (file)
@@ -262,6 +262,7 @@ int main(int argc, char **argv)
        /* initialize library and optionsfrom */
        if (!library_init(STRONGSWAN_CONF))
        {
+               library_deinit();
                abort();
        }
        if (lib->integrity &&