This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add missing LEAVE to POSIX.xs sigaction
authorGerard Goossen <gerard@ggoossen.net>
Thu, 12 Nov 2009 13:36:30 +0000 (14:36 +0100)
committerRafael Garcia-Suarez <rgs@consttype.org>
Thu, 12 Nov 2009 15:25:36 +0000 (16:25 +0100)
ext/POSIX/POSIX.xs

index 5b7ade6..d30a752 100644 (file)
@@ -1421,8 +1421,10 @@ sigaction(sig, optaction, oldaction = 0)
                        sv_setpvs(*svp, "DEFAULT");
                }
                RETVAL = sigaction(sig, (struct sigaction *)0, & oact);
-               if(RETVAL == -1)
+               if(RETVAL == -1) {
+                   LEAVE;
                    XSRETURN_UNDEF;
+                }
                /* Get back the mask. */
                svp = hv_fetchs(oldaction, "MASK", TRUE);
                if (sv_isa(*svp, "POSIX::SigSet")) {
@@ -1502,8 +1504,10 @@ sigaction(sig, optaction, oldaction = 0)
                 * essentially meaningless anyway.
                 */
                RETVAL = sigaction(sig, & act, (struct sigaction *)0);
-               if(RETVAL == -1)
+               if(RETVAL == -1) {
+                    LEAVE;
                    XSRETURN_UNDEF;
+                }
            }
 
            LEAVE;