fix check
authorJ Mohan Rao Arisankala <mohan@barracuda.com>
Fri, 6 May 2016 01:35:44 +0000 (07:05 +0530)
committerMatt Caswell <matt@openssl.org>
Mon, 9 May 2016 08:06:06 +0000 (09:06 +0100)
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/evp/bio_b64.c

index 6a95cf6dd67bb84262c0d37f46df436f9ac532d5..76fe9e3600a6d49fc0c2ff4184e3add6b14d2751 100644 (file)
@@ -122,12 +122,12 @@ static int b64_new(BIO *bi)
 
     ctx->cont = 1;
     ctx->start = 1;
+    ctx->base64 = EVP_ENCODE_CTX_new();
     if (ctx->base64 == NULL) {
         OPENSSL_free(ctx);
         return 0;
     }
 
-    ctx->base64 = EVP_ENCODE_CTX_new();
     BIO_set_data(bi, ctx);
     BIO_set_init(bi, 1);