diff options
author | Rich Salz <rsalz@openssl.org> | 2018-04-26 14:02:24 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-04-26 14:02:24 -0400 |
commit | fe1128dc2a6e7aae9010cf6595c78245e0eefd46 (patch) | |
tree | de62e713f375adaefd7e6bfd8491575c0fc530a3 /ssl | |
parent | 74a8acbdfb2c7f398d1ae2fe914cd32b437f6df4 (diff) |
Fix last(?) batch of malloc-NULL places
Add a script to find them in the future
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/6103)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/record/rec_layer_d1.c | 4 | ||||
-rw-r--r-- | ssl/ssl_err.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index 90029a2535..e3e168d9a1 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -20,8 +20,10 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) { DTLS_RECORD_LAYER *d; - if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) + if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) { + SSLerr(SSL_F_DTLS_RECORD_LAYER_NEW, ERR_R_MALLOC_FAILURE); return 0; + } rl->d = d; diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 0a86a7ea6b..bce203654a 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -67,6 +67,8 @@ static const ERR_STRING_DATA SSL_str_functs[] = { "dtls_get_reassembled_message"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_PROCESS_HELLO_VERIFY, 0), "dtls_process_hello_verify"}, + {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_RECORD_LAYER_NEW, 0), + "DTLS_RECORD_LAYER_new"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_DTLS_WAIT_FOR_DRY, 0), "dtls_wait_for_dry"}, {ERR_PACK(ERR_LIB_SSL, SSL_F_EARLY_DATA_COUNT_OK, 0), "early_data_count_ok"}, |