diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 11:45:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-19 13:00:44 +0100 |
commit | ccc355bc4e4368df51fbec33d6d0bcf035bffcca (patch) | |
tree | 9676d1a8233dc99e9fd66b8b00a432b246597fb7 | |
parent | 16e6f1fb6b4f763fcb4af0c309f72b7819db72ed (diff) |
coverity#1371375 Resource leak
Change-Id: I53b5ddc26e77168c29ba1bcfd199b1accbc54d3a
-rw-r--r-- | desktop/source/lib/init.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6199979fa094..dfad9b293739 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1505,7 +1505,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; } } |