From ba11573870084db076218cd092b4548504c1e348 Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Tue, 30 Jan 2024 15:06:31 +0100 Subject: [PATCH] TCTI: Fix error case lead in spi-ltt2go. platform_data was not freed in error cases. Signed-off-by: Juergen Repp --- src/tss2-tcti/tcti-spi-ltt2go.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tss2-tcti/tcti-spi-ltt2go.c b/src/tss2-tcti/tcti-spi-ltt2go.c index ec0daa531..09a276c2d 100644 --- a/src/tss2-tcti/tcti-spi-ltt2go.c +++ b/src/tss2-tcti/tcti-spi-ltt2go.c @@ -291,6 +291,8 @@ create_tcti_spi_ltt2go_platform (TSS2_TCTI_SPI_HELPER_PLATFORM *platform) libusb_exit (platform_data->ctx); } + free(platform_data); + return TSS2_BASE_RC_IO_ERROR; }