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 940fd45..b0f5969 100644 (file)
@@ -119,9 +119,8 @@ int prime_main(int argc, char **argv)
         }
     }
 
-    BN_free(bn);
-
     ret = 0;
  end:
+    BN_free(bn);
     return ret;
 }