mirror of
https://github.com/nfc-tools/libnfc.git
synced 2025-12-23 18:50:05 +00:00
nfc-emulate-uid: remove unreachable code and add proper cleaning when interrupted
This commit is contained in:
parent
db4fae9c2c
commit
6ab3c368b8
@ -79,7 +79,10 @@ intr_hdlr(int sig)
|
||||
if (pnd != NULL) {
|
||||
printf("\nAborting current command...\n");
|
||||
nfc_abort_command(pnd);
|
||||
nfc_close(pnd);
|
||||
}
|
||||
nfc_exit(context);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -237,7 +240,4 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
nfc_close(pnd);
|
||||
nfc_exit(context);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user