atspi-misc: Prevent memory leak of main_loop pointer 65/224965/1
authorJunsuChoi <jsuya.choi@samsung.com>
Fri, 14 Feb 2020 08:24:14 +0000 (17:24 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 14 Feb 2020 08:24:14 +0000 (17:24 +0900)
atspi_main_loop is generated with g_main_loop_new
The loop ends and a memory leak occurs.
Call unref on atspi_main_loop to prevent leaks.

Change-Id: If8158f0113bf3eb31ff7b2558c835a92219a40d2

atspi/atspi-misc.c

index a7efb66..84c15df 100644 (file)
@@ -971,6 +971,7 @@ atspi_event_main (void)
 {
   atspi_main_loop = g_main_loop_new (NULL, FALSE);
   g_main_loop_run (atspi_main_loop);
+  g_main_loop_unref(atspi_main_loop);
   atspi_main_loop = NULL;
 }