AtspiAccessibleWatcher: fix memory leak 14/296914/1 accepted/tizen/unified/20230809.072000
authorHosang Kim <hosang12.kim@samsung.com>
Mon, 7 Aug 2023 07:10:03 +0000 (16:10 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Mon, 7 Aug 2023 07:10:03 +0000 (16:10 +0900)
Change-Id: I0ee097b8277a96227aee24cbfd0c22e0329fe8a8

libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc

index f689097..8684f55 100644 (file)
@@ -311,7 +311,10 @@ void AtspiAccessibleWatcher::onAtspiEvents(AtspiEvent *event, void *watcher)
         return;
     }
     else if (isIdle == IdleEventState::IDLE_LISTEN_DONE && !strncmp(event->type, "window:post-render", 18))
+    {
+        if (name) free(name);
         return;
+    }
 
     AtspiAccessible *app = AtspiWrapper::Atspi_accessible_get_application(event->source, NULL);
     if (name && app)