diff options
-rw-r--r-- | capture.c | 13 | ||||
-rw-r--r-- | t/TestCapture.pm | 2 |
2 files changed, 7 insertions, 8 deletions
@@ -170,9 +170,8 @@ capture_DESTROY(struct capture *cp) - if (cp->input != &PL_sv_undef) { + if (cp->input != &PL_sv_undef) SvREFCNT_dec(cp->input); - /* Make sure runcap_free won't free the input sc_base pointer - */ - cp->rc.rc_cap[RUNCAP_STDIN].sc_base = NULL; - cp->rc.rc_cap[RUNCAP_STDIN].sc_fd = -1; - } + /* Make sure runcap_free won't free the input sc_base pointer + */ + cp->rc.rc_cap[RUNCAP_STDIN].sc_base = NULL; + cp->rc.rc_cap[RUNCAP_STDIN].sc_fd = -1; @@ -280,3 +279,3 @@ capture_run(struct capture *cp) - return res; + return res == 0; } diff --git a/t/TestCapture.pm b/t/TestCapture.pm index c7f31e3..8e8bf95 100644 --- a/t/TestCapture.pm +++ b/t/TestCapture.pm @@ -54,3 +54,3 @@ sub TestCapture { - $kw{result} = 0 unless exists $kw{result}; + $kw{result} = 1 unless exists $kw{result}; $kw{code} = 0 unless exists $kw{code}; |