fix memory leak

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1951 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2004-10-24 17:20:29 +00:00
parent 897ca8eff2
commit ace9520193
1 changed files with 4 additions and 1 deletions

View File

@ -305,7 +305,7 @@ static struct sc_pkcs15init_callbacks callbacks = {
int
main(int argc, char **argv)
{
struct sc_profile *profile;
struct sc_profile *profile = NULL;
unsigned int n;
int r = 0;
@ -419,6 +419,9 @@ main(int argc, char **argv)
}
out:
if (profile) {
sc_pkcs15init_unbind(profile);
}
if (card) {
sc_unlock(card);
sc_disconnect_card(card, 0);