Skip to content

Commit 66b307f

Browse files
committed
hv_store returns NULL on failure and this fixes a compile error on some versions of gcc with a value declared but not used
1 parent b45e9cd commit 66b307f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Verify.xs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ SV * new(class, ...)
362362
sv_magicext(store, NULL, PERL_MAGIC_ext,
363363
&store_magic, (const char *)x509_store, 0);
364364

365-
hv_store(attributes, "STORE", 5, store, 0);
365+
if((hv_store(attributes, "STORE", 5, store, 0)) == NULL)
366+
croak("unable to init store");
366367

367368
RETVAL = sv_bless( self, gv_stashpv( class, 0 ) );
368369

0 commit comments

Comments
 (0)