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 6a95cf6..76fe9e3 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);