[PATCH] shared/mainloop: Fix timeout data memleak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Valgrind reports "timeout_data" as definitely lost.
Fix this issue in timeout_destroy function.
---
 src/shared/mainloop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shared/mainloop.c b/src/shared/mainloop.c
index eacb6a4..09c46a7 100644
--- a/src/shared/mainloop.c
+++ b/src/shared/mainloop.c
@@ -283,6 +283,8 @@ static void timeout_destroy(void *user_data)
 
 	if (data->destroy)
 		data->destroy(data->user_data);
+
+	free(data);
 }
 
 static void timeout_callback(int fd, uint32_t events, void *user_data)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux