aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--capture.c13
-rw-r--r--t/TestCapture.pm2
2 files changed, 7 insertions, 8 deletions
diff --git a/capture.c b/capture.c
index f22fc9f..7b2bf9a 100644
--- a/capture.c
+++ b/capture.c
@@ -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};

Return to:

Send suggestions and report system problems to the System administrator.