summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-15 12:43:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-15 12:43:06 +0100
commite141017c686c4fb1dbd3533dffff396f62f103f7 (patch)
treef9a82b84ed8368b737bdeca5ce4400d6cd472b31 /desktop
parenta3123cd0105c1feec3a06d071c97cb758b307bf8 (diff)
coverity#1361589 Resource leak
this is the pattern used everywhere else. Change-Id: I18bdb43203bae8b9e36d59b4c457aa2087fdc117
Diffstat (limited to 'desktop')
-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 ad393e6879fe..09f68830f7f1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1188,7 +1188,8 @@ public:
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
- mpCallback->queue(LOK_CALLBACK_UNO_COMMAND_RESULT, strdup(aStream.str().c_str()));
+ OString aPayload = aStream.str().c_str();
+ mpCallback->queue(LOK_CALLBACK_UNO_COMMAND_RESULT, aPayload.getStr());
}
virtual void SAL_CALL disposing(const css::lang::EventObject&) throw (css::uno::RuntimeException, std::exception) override {}