From 68dc682499ea3fe27d909c946d7abd39062d6efd Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 30 Apr 2015 17:48:31 -0400 Subject: In apps, malloc or die No point in proceeding if you're out of memory. So change *all* OPENSSL_malloc calls in apps to use the new routine which prints a message and exits. Reviewed-by: Richard Levitte --- apps/dhparam.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'apps/dhparam.c') diff --git a/apps/dhparam.c b/apps/dhparam.c index e7fa7ae26f..c66c5916cf 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -379,11 +379,7 @@ int dhparam_main(int argc, char **argv) len = BN_num_bytes(dh->p); bits = BN_num_bits(dh->p); - data = OPENSSL_malloc(len); - if (data == NULL) { - perror("OPENSSL_malloc"); - goto end; - } + data = app_malloc(len, "print a BN"); BIO_printf(out, "#ifndef HEADER_DH_H\n" "# include \n" "#endif\n" -- cgit v1.2.3