forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
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 }