Ensure BIGNUM is freed in an error path
authorMatt Caswell <matt@openssl.org>
Tue, 26 Apr 2016 17:29:49 +0000 (18:29 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 1 Jun 2016 13:51:36 +0000 (14:51 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/prime.c

index 940fd4502a391d16dab828db6ce2f2095e204641..b0f5969a2203d6c87310bc146ca33d473720facf 100644 (file)
@@ -119,9 +119,8 @@ int prime_main(int argc, char **argv)
         }
     }
 
-    BN_free(bn);
-
     ret = 0;
  end:
+    BN_free(bn);
     return ret;
 }