From 748e4f3d702def1a4bff191e0cf93b6a05340f01 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 07:41:34 +0000
Subject: [PATCH] add gpio led uart

---
 kernel/drivers/nfc/st21nfca/se.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/drivers/nfc/st21nfca/se.c b/kernel/drivers/nfc/st21nfca/se.c
index d416365..6a1d3b2 100644
--- a/kernel/drivers/nfc/st21nfca/se.c
+++ b/kernel/drivers/nfc/st21nfca/se.c
@@ -236,6 +236,12 @@
 					ST21NFCA_EVT_TRANSMIT_DATA,
 					apdu, apdu_length);
 	default:
+		/* Need to free cb_context here as at the moment we can't
+		 * clearly indicate to the caller if the callback function
+		 * would be called (and free it) or not. In both cases a
+		 * negative value may be returned to the caller.
+		 */
+		kfree(cb_context);
 		return -ENODEV;
 	}
 }

--
Gitblit v1.6.2