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/record/rec_layer_d1.c | |
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/record/rec_layer_d1.c')
-rw-r--r-- | ssl/record/rec_layer_d1.c | 4 |
1 files changed, 3 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; |