This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Check success of store().
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 25 Jun 2015 00:00:55 +0000 (20:00 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 27 Jun 2015 03:09:45 +0000 (23:09 -0400)
Coverity CID 118699.

dist/Storable/Storable.xs

index dbb80a9..1537697 100644 (file)
@@ -2658,7 +2658,9 @@ static int store_hash(pTHX_ stcxt_t *cxt, HV *hv)
                             TRACEME(("(#%d) key '%s'", i, key));
                         }
                         if (flags & SHV_K_ISSV) {
-                            store(aTHX_ cxt, key_sv);
+                            int ret;
+                            if ((ret = store(aTHX_ cxt, key_sv)))
+                                goto out;
                         } else {
                             WLEN(len);
                             if (len)