summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-19 15:08:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-19 18:10:12 +0000
commit169298fa73d2c5429d1960db6049a4ed15653b4f (patch)
treecba8df918a76cd1a97a76f316605b91d29d57737 /libreofficekit
parent8f85595371de1848c9eb85492f04eb0e2bfc9cf5 (diff)
coverity#1343631 Resource leak
Change-Id: Ic5d7c88ae4080c2e103fb691c2e326a9e239aa12
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 6b899551cd0d..d23aa2ce7d2d 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2649,13 +2649,13 @@ lok_doc_view_set_edit(LOKDocView* pDocView,
gboolean bEdit)
{
LOKDocViewPrivate& priv = getPrivate(pDocView);
+ if (!priv->m_pDocument)
+ return;
+
GTask* task = g_task_new(pDocView, nullptr, nullptr, nullptr);
LOEvent* pLOEvent = new LOEvent(LOK_SET_EDIT);
GError* error = nullptr;
- if (!priv->m_pDocument)
- return;
-
pLOEvent->m_bEdit = bEdit;
g_task_set_task_data(task, pLOEvent, LOEvent::destroy);