proper cleanup on error
authorMartin Willi <martin@strongswan.org>
Wed, 3 Oct 2007 15:07:46 +0000 (15:07 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 3 Oct 2007 15:07:46 +0000 (15:07 -0000)
src/openac/openac.c

index 2c93487..cde6ba3 100755 (executable)
@@ -293,7 +293,8 @@ int main(int argc, char **argv)
                                        }
                                        if (!optionsfrom(path, &argc, &argv, optind))
                                        {
-                                               exit(1);
+                                               status = 1;
+                                               goto end;
                                        }
                                }
                                continue;
@@ -428,7 +429,8 @@ int main(int argc, char **argv)
        else
        {
                DBG1("  integrity test failed");
-               exit(3);
+               status = 3;
+               goto end;
        }
 #endif /* INTEGRITY_TEST */