Use app_malloc; two missing cases.
authorRich Salz <rsalz@openssl.org>
Mon, 16 May 2016 18:58:00 +0000 (14:58 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 16 May 2016 19:18:22 +0000 (15:18 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
apps/apps.c
apps/s_client.c

index c7e01b0cc450de73efaf38f2d18b07fe0a45ee92..1d3c66a1aeb9c0791463ff226f9ff19cfebb6fc7 100644 (file)
@@ -2633,7 +2633,7 @@ void wait_for_async(SSL *s)
         return;
     if (numfds == 0)
         return;
-    fds = OPENSSL_malloc(sizeof(OSSL_ASYNC_FD) * numfds);
+    fds = app_malloc(sizeof(OSSL_ASYNC_FD) * numfds, "allocate async fds");
     if (!SSL_get_all_async_fds(s, fds, &numfds)) {
         OPENSSL_free(fds);
     }
index 42ef049d24879d91660ac7574891ab466b2951fd..fada838b68bf7210d2c0fa450c29e3801b25acd0 100644 (file)
@@ -509,7 +509,7 @@ static ossl_ssize_t hexdecode(const char **inptr, void *result)
 {
     unsigned char **out = (unsigned char **)result;
     const char *in = *inptr;
-    unsigned char *ret = OPENSSL_malloc(strlen(in)/2);
+    unsigned char *ret = app_malloc(strlen(in)/2, "hexdecode");
     unsigned char *cp = ret;
     uint8_t byte;
     int nibble = 0;