summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/torture/smbiconv.c1
-rw-r--r--source4/torture/smbiconv.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c
index 72fbdc470f..47353d2a94 100644
--- a/source3/torture/smbiconv.c
+++ b/source3/torture/smbiconv.c
@@ -216,6 +216,7 @@ int main(int argc, char *argv[])
cd = smb_iconv_open(to, from);
if (cd == (smb_iconv_t)-1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
+ if (out != stdout) fclose(out);
return 1;
}
diff --git a/source4/torture/smbiconv.c b/source4/torture/smbiconv.c
index 4eece66bdf..173f37175b 100644
--- a/source4/torture/smbiconv.c
+++ b/source4/torture/smbiconv.c
@@ -208,6 +208,7 @@ int main(int argc, char *argv[])
cd = smb_iconv_open_ex(tctx, to, from, lp_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true));
if((int)cd == -1) {
DEBUG(0,("unable to find from or to encoding, exiting...\n"));
+ if (out != stdout) fclose(out);
return 1;
}