forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/nfc/st-nci/se.c
....@@ -664,6 +664,12 @@
664664 ST_NCI_EVT_TRANSMIT_DATA, apdu,
665665 apdu_length);
666666 default:
667
+ /* Need to free cb_context here as at the moment we can't
668
+ * clearly indicate to the caller if the callback function
669
+ * would be called (and free it) or not. In both cases a
670
+ * negative value may be returned to the caller.
671
+ */
672
+ kfree(cb_context);
667673 return -ENODEV;
668674 }
669675 }