From 8a50b1f2eb295844839e968822bffcedee0a7250 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Sun, 2 Mar 2014 20:18:57 +0200 Subject: [PATCH] android/avctp: Fix leaking passthrough handler In case the handler is not destroyed by the owner automatically free it as there is no use for it after the session is freed. --- android/avctp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/avctp.c b/android/avctp.c index bc1bd80eb..f7c99ea31 100644 --- a/android/avctp.c +++ b/android/avctp.c @@ -1490,6 +1490,8 @@ void avctp_shutdown(struct avctp *session) if (session->destroy) session->destroy(session->data); + g_free(session->handler); + if (session->key.timer > 0) g_source_remove(session->key.timer); -- 2.47.3