Fix use after free bug

nfc_exit(context); was called 2 times

CID 1090348 (#1 of 1): Use after free (USE_AFTER_FREE)53. deref_arg:
Calling "nfc_exit(nfc_context *)" dereferences freed pointer "context".
(The dereference is assumed on the basis of the 'nonnull' parameter
attribute.)
This commit is contained in:
Ludovic Rousseau 2013-09-19 20:38:56 +02:00
parent 967f6e5623
commit 107b4ece8b

View file

@ -486,7 +486,6 @@ main(int argc, char *argv[])
}
if (!initiator_only_mode) {
nfc_close(pndTarget);
nfc_exit(context);
}
nfc_exit(context);
exit(EXIT_FAILURE);