From 433421a678a2dbca09640f27c5dc7fc21f25cf26 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Fri, 3 Oct 2014 16:54:49 +0300 Subject: [PATCH] murphyif: Free the connect timer when unloading This fixes a crash when unloading module-murphy-ivi. Triggering the crash probably requires that Murphy isn't running (I haven't tried with Murphy running). The crash occurs after the module has unloaded, and the connect timer fires - at that point the timer callback function has been removed from the memory, so the timer callback pointer points to invalid memory, causing a segfault when calling the callback. Change-Id: I78290f172eff70716491000ef9d4f37822bf3faa --- murphy/murphyif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/murphy/murphyif.c b/murphy/murphyif.c index ce24ba8..fab0970 100644 --- a/murphy/murphyif.c +++ b/murphy/murphyif.c @@ -398,6 +398,8 @@ void pa_murphyif_done(struct userdata *u) PA_LLIST_FOREACH_SAFE(req, r, rif->reqs) pa_xfree(req); + cancel_schedule(u, rif); + pa_xfree((void *)rif->addr); pa_xfree((void *)rif->inpres.name); pa_xfree((void *)rif->outres.name); -- 2.7.4