elm_atspi_bridge: fix memory leak 93/230593/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 13 Apr 2020 02:17:19 +0000 (11:17 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Mon, 13 Apr 2020 04:17:00 +0000 (04:17 +0000)
Summary:
Dynamic memory is allocated by calling function
'eldbus_message_iter_container_new' and lost by returning without free.

Reviewers: Hermet, woohyun, jsuya, herb

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11688

Change-Id: I738496e452f1b75ff491f8bd4bccb0f4213847fa

src/lib/elementary/elm_atspi_bridge.c

index 9e90835d752fdc9003737ed74bc975f19353a048..e7ac8feaeab41645b45ce985c248ec34f8d902e9 100644 (file)
@@ -2431,6 +2431,7 @@ _text_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
      }
    else
      {
+        eldbus_message_iter_container_close(iter, iter_array);
         goto fail;
      }
 
@@ -2493,6 +2494,7 @@ _text_default_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus
    else
      {
         eldbus_message_unref(ret);
+        eldbus_message_iter_container_close(iter, iter_array);
         return _dbus_invalid_ref_error_new(msg);
      }