summaryrefslogtreecommitdiffstats
path: root/crypto/txt_db
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-05-30 16:49:00 +0000
committerRichard Levitte <levitte@openssl.org>2002-05-30 16:49:00 +0000
commitd66c022a1f6835e73bccf9a8b11869cbe20814a7 (patch)
tree28105b668a3fba5fe07014a8610f986c86aa1bcd /crypto/txt_db
parent04c8e99b39413d9bb8962f6d8240f389e66b0739 (diff)
Check the return values where memory allocation failures may happen.
PR: 49
Diffstat (limited to 'crypto/txt_db')
-rw-r--r--crypto/txt_db/txt_db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c
index 3b04fe280c..92fcbde47f 100644
--- a/crypto/txt_db/txt_db.c
+++ b/crypto/txt_db/txt_db.c
@@ -122,7 +122,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
else
{
buf->data[offset-1]='\0'; /* blat the '\n' */
- p=(char *)OPENSSL_malloc(add+offset);
+ if (!(p=(char *)OPENSSL_malloc(add+offset))) goto err;
offset=0;
}
pp=(char **)p;