Revert "Revert "[Ecore] Memory leak fixed in Ecore Wayland"" 39/128439/1
authorMinchul Lee <slotus.lee@samsung.com>
Wed, 10 May 2017 04:58:19 +0000 (13:58 +0900)
committerMinchul Lee <slotus.lee@samsung.com>
Wed, 10 May 2017 04:58:25 +0000 (13:58 +0900)
This reverts commit 1ccf6046ed469d18aa4816e1fb2422a8e8d98e89.

Change-Id: I1e8b9d8898e75128c5ec8ca90f2d03f74939b400

src/lib/ecore_wayland/ecore_wl_dnd.c

index 7c2eb5b..39f59f3 100644 (file)
@@ -627,6 +627,14 @@ _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source)
    if (source->refcount == 0)
      {
         wl_data_offer_destroy(source->data_offer);
+        // TIZEN_ONLY(20170306): Free the heap allocated content of wl_array
+        if (source->types.data)
+          {
+             char **t;
+             wl_array_for_each(t, &source->types)
+               free(*t);
+          }
+        //
         wl_array_release(&source->types);
         free(source);
      }