From f2157e90bafb84e3cdcc941b8351cc08ec9f0fe7 Mon Sep 17 00:00:00 2001 From: nils Date: Mon, 13 Dec 2004 09:48:54 +0000 Subject: [PATCH] don't close stdout/stderr git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2005 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/ctx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libopensc/ctx.c b/src/libopensc/ctx.c index 59401a3f..b3756c28 100644 --- a/src/libopensc/ctx.c +++ b/src/libopensc/ctx.c @@ -621,9 +621,9 @@ int sc_release_context(struct sc_context *ctx) if (drv->dll) scdl_close(drv->dll); } - if (ctx->debug_file) + if (ctx->debug_file && ctx->debug_file != stdout) fclose(ctx->debug_file); - if (ctx->error_file) + if (ctx->error_file && ctx->error_file != stderr) fclose(ctx->error_file); if (ctx->preferred_language) free(ctx->preferred_language);