diff options
Diffstat (limited to 'crypto/bio/b_print.c')
-rw-r--r-- | crypto/bio/b_print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 1ef8547918..03ee45a232 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -819,9 +819,10 @@ doapr_outch(char **sbuffer, *maxlen += BUFFER_INC; if (*buffer == NULL) { - *buffer = OPENSSL_malloc(*maxlen); - if (*buffer == NULL) + if ((*buffer = OPENSSL_malloc(*maxlen)) == NULL) { + BIOerr(BIO_F_DOAPR_OUTCH, ERR_R_MALLOC_FAILURE); return 0; + } if (*currlen > 0) { if (!ossl_assert(*sbuffer != NULL)) return 0; |