egk-tool: fix missed initialisation of card pointer
If util_connect_card_ex() fails, sc_disconnect_card() will use a random pointer leading to segmentation faults.
This commit is contained in:
parent
209be72979
commit
c3a9458fa8
|
@ -145,7 +145,7 @@ main (int argc, char **argv)
|
|||
struct gengetopt_args_info cmdline;
|
||||
struct sc_path path;
|
||||
struct sc_context *ctx;
|
||||
struct sc_card *card;
|
||||
struct sc_card *card = NULL;
|
||||
unsigned char *data = NULL;
|
||||
size_t data_len = 0;
|
||||
int r;
|
||||
|
|
Loading…
Reference in New Issue