diff options
Diffstat (limited to 'test/ssl_old_test.c')
-rw-r--r-- | test/ssl_old_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ssl_old_test.c b/test/ssl_old_test.c index bbe95d70f9..91c8b5b7b5 100644 --- a/test/ssl_old_test.c +++ b/test/ssl_old_test.c @@ -310,6 +310,11 @@ static int cb_server_alpn(SSL *s, const unsigned char **out, * verify_alpn. */ alpn_selected = OPENSSL_malloc(*outlen); + if (alpn_selected == NULL) { + fprintf(stderr, "failed to allocate memory\n"); + OPENSSL_free(protos); + abort(); + } memcpy(alpn_selected, *out, *outlen); *out = alpn_selected; |