diff --git a/crypto/x509/by_store.c b/crypto/x509/by_store.c index d84ad2f66ee84..1474474a2d1e9 100644 --- a/crypto/x509/by_store.c +++ b/crypto/x509/by_store.c @@ -122,7 +122,7 @@ static int by_store_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argp, uris = sk_OPENSSL_STRING_new_null(); X509_LOOKUP_set_method_data(ctx, uris); } - if (!sk_OPENSSL_STRING_push(uris, data)) { + if (sk_OPENSSL_STRING_push(uris, data) <= 0) { OPENSSL_free(data); return 0; } diff --git a/test/evp_test.c b/test/evp_test.c index 2de31ef06ba98..4ca11f58290b8 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -203,7 +203,7 @@ static int ctrladd(STACK_OF(OPENSSL_STRING) *controls, const char *value) if (data == NULL) return -1; - if (!sk_OPENSSL_STRING_push(controls, data)) { + if (sk_OPENSSL_STRING_push(controls, data) <= 0) { OPENSSL_free(data); return -1; }