Change "=" to "==" in "if ((exp == EXP_NONNULL) ...".
Fixes: d090695101a9 "test: add a sanity test for memory allocation functions"
Resolves: https://scan5.scan.coverity.com/#/project-view/65279/10222?selectedIssue=
1662047
Resolves: https://scan5.scan.coverity.com/#/project-view/65279/10222?selectedIssue=
1662049
Related: https://github.com/openssl/project/issues/1317
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28238)
#if !defined(OPENSSL_SMALL_FOOTPRINT)
if (IS_FAIL(exp) && !TEST_ptr_null(freeptr))
res = 0;
- if ((exp = EXP_NONNULL) && !TEST_ptr(freeptr))
+ if ((exp == EXP_NONNULL) && !TEST_ptr(freeptr))
res = 0;
#else /* OPENSSL_SMALL_FOOTPRINT */
if (!TEST_ptr_null(ret) || !TEST_ptr_null(freeptr))