Files
Tobias Wiese a94e52cb9e nfc_linux: Don't close stdin if fido_nl_new fails
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>
2025-12-19 08:46:52 +01:00
..