-/* crypto/bio/bf_buff.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <stdio.h>
#include <errno.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
#include <openssl/bio.h>
#include <openssl/evp.h>
{
BIO_LINEBUFFER_CTX *ctx;
- ctx = OPENSSL_malloc(sizeof(BIO_LINEBUFFER_CTX));
+ ctx = OPENSSL_malloc(sizeof(*ctx));
if (ctx == NULL)
return (0);
ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);
if (a == NULL)
return (0);
b = (BIO_LINEBUFFER_CTX *)a->ptr;
- if (b->obuf != NULL)
- OPENSSL_free(b->obuf);
+ OPENSSL_free(b->obuf);
OPENSSL_free(a->ptr);
a->ptr = NULL;
a->init = 0;