From 49cec373657cf196aba63b03f3de822bf3a177e1 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <
[email protected]>
Date: Wed, 29 Apr 2015 09:38:16 +0200
Subject: [PATCH] initialize variable type to prevent segfaults
This should fix
https://rt.cpan.org/Ticket/Display.html?id=95102
---
XS.xs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/XS.xs b/XS.xs
index a779f09..a0fd4ca 100644
--- a/XS.xs
+++ b/XS.xs
@@ -590,7 +590,7 @@ play_expr (_self, _var, ...)
/* check at each point if the rurned thing was a code */
if (SvROK(ref) && SvTYPE(SvRV(ref)) == SVt_PVCV) {
- SV* type;
+ SV* type = &PL_sv_undef;
if (return_ref && i >= var_len) {
XPUSHs(SvREFCNT_inc(ref));
XSRETURN(1);
--
2.1.2