Skip to content

Commit bdde538

Browse files
Upsylonbaregregkh
authored andcommitted
rtc: optee: fix memory leak on driver removal
[ Upstream commit a531350 ] Fix a memory leak in case of driver removal. Free the shared memory used for arguments exchanges between kernel and OP-TEE RTC PTA. Fixes: 81c2f05 ("rtc: optee: add RTC driver for OP-TEE RTC PTA") Signed-off-by: Clément Le Goffic <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d98a5ee commit bdde538

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/rtc/rtc-optee.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ static int optee_rtc_remove(struct device *dev)
320320
{
321321
struct optee_rtc *priv = dev_get_drvdata(dev);
322322

323+
tee_shm_free(priv->shm);
323324
tee_client_close_session(priv->ctx, priv->session_id);
324325
tee_client_close_context(priv->ctx);
325326

0 commit comments

Comments
 (0)