summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-19 11:45:40 +0100
committerHenry Castro <hcastro@collabora.com>2016-11-01 07:16:14 -0400
commit7512f1e1867672c06d987a94edb07f0a7ea0fc1e (patch)
tree9a5ccc4609e3f83af71a1411c3c3222073f9903a
parentd3b461c0854b50ebbf08fb402d58401fef09690e (diff)
coverity#1371375 Resource leakcp-5.1-11
Change-Id: I53b5ddc26e77168c29ba1bcfd199b1accbc54d3a
-rw-r--r--desktop/source/lib/init.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ab7b557def20..e03843759998 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1858,7 +1858,8 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
- pDocument->mpCallbackFlushHandlers[nView]->queue(LOK_CALLBACK_UNO_COMMAND_RESULT, strdup(aStream.str().c_str()));
+ OString aPayload = aStream.str().c_str();
+ pDocument->mpCallbackFlushHandlers[nView]->queue(LOK_CALLBACK_UNO_COMMAND_RESULT, aPayload.getStr());
return;
}
}