fixed resource leak

This commit is contained in:
Frank Morgner 2015-01-24 22:16:22 +01:00
parent 6641cbf455
commit 00330b2c79
1 changed files with 9 additions and 9 deletions

View File

@ -222,7 +222,6 @@ int sc_connect_card(sc_reader_t *reader, sc_card_t **card_out)
}
if (card->name == NULL)
card->name = card->driver->name;
*card_out = card;
/* Override card limitations with reader limitations.
* Note that zero means no limitations at all.
@ -246,6 +245,7 @@ int sc_connect_card(sc_reader_t *reader, sc_card_t **card_out)
goto err;
}
#endif
*card_out = card;
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
err: