From: Seungho, Baek Date: Mon, 16 Apr 2018 05:58:25 +0000 (+0900) Subject: [Tizen] Fix to memory leak in clipboard-impl-ecore-wl X-Git-Tag: accepted/tizen/unified/20180417.173124~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F176002%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Fix to memory leak in clipboard-impl-ecore-wl This reverts commit 466af42f6c158268247aed7be8f3223d96262a19. Change-Id: I3f8ae526eaf980ce5a7ab7ae34f967c69256c360 --- diff --git a/dali/internal/clipboard/tizen-wayland/ecore-wl2/clipboard-impl-ecore-wl2.cpp b/dali/internal/clipboard/tizen-wayland/ecore-wl2/clipboard-impl-ecore-wl2.cpp index 8bcf344..309a07a 100644 --- a/dali/internal/clipboard/tizen-wayland/ecore-wl2/clipboard-impl-ecore-wl2.cpp +++ b/dali/internal/clipboard/tizen-wayland/ecore-wl2/clipboard-impl-ecore-wl2.cpp @@ -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; }