From 092e87969d1670bbbc468bfd8ad19733976bd903 Mon Sep 17 00:00:00 2001 From: aet Date: Sun, 17 Feb 2002 21:55:57 +0000 Subject: [PATCH] Bugfix for sc_destroy_context, pcsc_ctx was never released git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@212 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/sc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libopensc/sc.c b/src/libopensc/sc.c index c1712fc3..64dd93e9 100644 --- a/src/libopensc/sc.c +++ b/src/libopensc/sc.c @@ -208,6 +208,9 @@ int sc_destroy_context(struct sc_context *ctx) SC_FUNC_CALLED(ctx, 1); for (i = 0; i < ctx->reader_count; i++) free(ctx->readers[i]); + ctx->debug_file = ctx->error_file = NULL; + SCardReleaseContext(ctx->pcsc_ctx); + ctx->pcsc_ctx = 0; free(ctx); return 0; }