mirror of
https://github.com/token2/libfido2.git
synced 2026-06-22 14:42:15 -07:00
The call to nfc_free is not needed because when calloc fails ctx will be NULL and nfc_free will do nothing, when fido_nl_new() fails ctx->nl will be null and does not need to be freed. Additionally ctx->fd is 0 (due to calloc zero-initializing ctx) and should not be closed. Therefore I replaced this with a free call to just undo the (potential) allocation by calloc. Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>