summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-15 12:43:02 +0100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:06 -0400
commit8ca1000940a7657967449ce12e681d4c56f6dda7 (patch)
treee103c015f0b249ef4659bb5ea484f6aceaeac0a1 /desktop/source
parenta83277ff65adb3126626b7a24a7012bc138b73ce (diff)
coverity#1361589 Resource leak
this is the pattern used everywhere else. Change-Id: I18bdb43203bae8b9e36d59b4c457aa2087fdc117 (cherry picked from commit e141017c686c4fb1dbd3533dffff396f62f103f7)
Diffstat (limited to 'desktop/source')
-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 728dacdcd25a..70573ed64944 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1463,7 +1463,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 {}