Fix Coverity issues
[platform/core/uifw/dali-adaptor.git] / dali / internal / clipboard / tizen-wayland / clipboard-impl-ecore-wl.cpp
index 4580e66..821a730 100644 (file)
@@ -162,6 +162,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;
     }
 
@@ -169,10 +173,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;
   }