Fix explicit EC curve encoding.
[openssl.git] / crypto / ec / ecp_mont.c
index a9c6040937c0a257e716ea080c87728fb9232e48..1a760d123912a0c32804a89c0174a68beaaf9d0a 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -7,12 +8,6 @@
  * https://www.openssl.org/source/license.html
  */
 
-/* ====================================================================
- * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
- * Portions of this software developed by SUN MICROSYSTEMS, INC.,
- * and contributed to the OpenSSL project.
- */
-
 #include <openssl/err.h>
 
 #include "ec_lcl.h"
@@ -178,6 +173,7 @@ int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p,
     }
 
  err:
+    BN_free(one);
     BN_CTX_free(new_ctx);
     BN_MONT_CTX_free(mont);
     return ret;