forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/nfc/st21nfca/se.c
....@@ -236,6 +236,12 @@
236236 ST21NFCA_EVT_TRANSMIT_DATA,
237237 apdu, apdu_length);
238238 default:
239
+ /* Need to free cb_context here as at the moment we can't
240
+ * clearly indicate to the caller if the callback function
241
+ * would be called (and free it) or not. In both cases a
242
+ * negative value may be returned to the caller.
243
+ */
244
+ kfree(cb_context);
239245 return -ENODEV;
240246 }
241247 }