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
This commit is contained in:
aet 2002-02-17 21:55:57 +00:00
parent 262e5c2083
commit 092e87969d

View File

@ -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;
}