Do proper cleanup in some error cases in pki signcrl.
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 13:09:30 +0000 (15:09 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 16:11:44 +0000 (18:11 +0200)
src/pki/commands/signcrl.c

index 4b1c12e..9a21bd9 100644 (file)
@@ -238,7 +238,8 @@ static int sign_crl()
                                }
                                else
                                {
-                                       return command_usage( "invalid revocation reason");
+                                       error = "invalid revocation reason";
+                                       goto usage;
                                }
                                continue;
                        case 'd':
@@ -252,7 +253,8 @@ static int sign_crl()
                        case 'f':
                                if (!get_form(arg, &form, CRED_CERTIFICATE))
                                {
-                                       return command_usage("invalid output format");
+                                       error = "invalid output format";
+                                       goto usage;
                                }
                                continue;
                        case EOF: