[Tizen] Fix to memory leak in clipboard-impl-ecore-wl 81/176981/1
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 24 Apr 2018 06:40:40 +0000 (15:40 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 24 Apr 2018 06:44:42 +0000 (15:44 +0900)
This reverts commit c9c9139d9958f1a23a12ab398505046ee8ff2054.

Change-Id: Id4fe1e3ac7d9194c75f9f34944c122127fb93d26

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;
   }