Fix for a segfaul. Patch provided by Albert Solana Berengu

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2857 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2006-02-23 13:40:03 +00:00
parent 530dc0916d
commit 0a9912233d
1 changed files with 3 additions and 2 deletions

View File

@ -743,10 +743,11 @@ int sc_release_context(sc_context_t *ctx)
}
for (i = 0; ctx->card_drivers[i]; i++) {
struct sc_card_driver *drv = ctx->card_drivers[i];
if (drv->dll)
lt_dlclose(drv->dll);
if (drv->atr_map)
_sc_free_atr(ctx, drv);
if (drv->dll)
lt_dlclose(drv->dll);
}
if (ctx->preferred_language != NULL)
free(ctx->preferred_language);