Commit 107b4ece authored by Ludovic Rousseau's avatar Ludovic Rousseau

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.)
parent 967f6e56
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment