Fix memory leak 70/309370/1
authorIlho Kim <ilho159.kim@samsung.com>
Tue, 9 Apr 2024 07:24:38 +0000 (16:24 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Tue, 9 Apr 2024 07:24:55 +0000 (16:24 +0900)
Change-Id: Ibd312886bd794c931ad848cf474a2d060f47ab3d
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/eventsystem.c

index 9a5339eb2fec3aaab60db25c1d8408d6bbbba7a9..c7856af01e16405139f75f6a3815675dcb64daf9 100644 (file)
@@ -861,6 +861,7 @@ static int __eventsystem_send_event(GDBusConnection *conn, eventinfo_s *evti, bu
                if (g_dbus_connection_flush_sync(conn, NULL, &error) == FALSE) {
                        _E("g_dbus_connection_flush_sync() is failed. err(%s)",
                                        error ? error->message : "");
+                       g_error_free(error);
                }
        }
 
@@ -1785,6 +1786,7 @@ static void _send_last_user_event(const char *event_name,
                        if (g_dbus_connection_flush_sync(conn, NULL, &error) == FALSE) {
                                _E("g_dbus_connection_flush_sync() is failed. err(%s)",
                                                error ? error->message : "");
+                               g_error_free(error);
                        }
                }
        }