We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 785b67a + b53628b commit 1c4bfefCopy full SHA for 1c4bfef
1 file changed
ext/openssl/ossl.c
@@ -34,7 +34,11 @@ ossl_##name##_ary2sk0(VALUE ary) \
34
" of class ##type##"); \
35
} \
36
x = dup(val); /* NEED TO DUP */ \
37
- sk_##type##_push(sk, x); \
+ if (!sk_##type##_push(sk, x)) { \
38
+ type##_free(x); \
39
+ sk_##type##_pop_free(sk, type##_free); \
40
+ ossl_raise(eOSSLError, NULL); \
41
+ } \
42
43
return (VALUE)sk; \
44
0 commit comments