[openssl-dev] [openssl.org #4401] [PATCH] plug potential memory leak(s) in OpenSSL 1.1 pre 4 in 'ec_lib.c'
Salz, Rich
rsalz at akamai.com
Tue Mar 8 21:44:36 UTC 2016
> >> + if (dest->mont_data != NULL)
> >> + BN_MONT_CTX_free(dest->mont_data);
> >
> >Free routines don't need to check for non-NULL.
>
> Yes, don’t *have* to. But does it hurt to check?
It makes folks wonder why the check is only there sometimes. It adds to code complexity/test-coverage issues.
More information about the openssl-dev
mailing list