[Tizen] Fix to memory leak in clipboard-impl-ecore-wl 02/175202/1 accepted/tizen/unified/20180412.073721 submit/tizen/20180409.102708 submit/tizen/20180410.045356
authorhuiyu.eun <huiyu.eun@samsung.com>
Mon, 9 Apr 2018 07:54:29 +0000 (16:54 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Mon, 9 Apr 2018 07:54:38 +0000 (16:54 +0900)
This reverts commit 19fe86b6871c034ac496d8b9b0aa2ca65017f018.

Change-Id: Ie1e60a44c206439047f942d9212d95892575fb18
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
dali/internal/clipboard/tizen-wayland/ecore-wl2/clipboard-impl-ecore-wl2.cpp

index 8bcf344..309a07a 100644 (file)
@@ -160,6 +160,10 @@ struct Clipboard::Impl
       DALI_LOG_ERROR("Unable to call method org.freedesktop.DBus.Properties.Get: %s %s",
       errname, errmsg);
       eldbus_message_unref(req);
+      if( reply )
+      {
+        eldbus_message_unref(reply);
+      }
       return -1;
     }
 
@@ -167,10 +171,12 @@ struct Clipboard::Impl
     {
       DALI_LOG_ERROR("Cannot get arguments from eldbus");
       eldbus_message_unref(req);
+      eldbus_message_unref(reply);
       return -1;
     }
 
     eldbus_message_unref(req);
+    eldbus_message_unref(reply);
     DALI_LOG_ERROR("cbhm item count(%d)", count);
     return count;
   }