Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2458
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/58/2458/1
coverity#988423: fix memory leak
Change-Id: I3ac2cca7e24e6cc1b47b42c2d42bc7caee91b559
---
M sd/source/ui/remotecontrol/BluetoothServer.cxx
M sd/source/ui/remotecontrol/BluetoothServer.hxx
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx
b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 9c271aa..475e0c1 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -586,7 +586,7 @@
mpCommunicators( pCommunicators )
{
#ifdef LINUX_BLUETOOTH
- mpImpl = new BluetoothServerImpl();
+ mpImpl.reset(new BluetoothServerImpl());
#endif
(void) mpImpl; // Avoid warning: private field 'mpImpl' is not used
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx
b/sd/source/ui/remotecontrol/BluetoothServer.hxx
index 8078ede..bfaeccc 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.hxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx
@@ -12,6 +12,8 @@
#include <osl/thread.hxx>
#include <vector>
+#include <boost/scoped_ptr.hpp>
+
namespace sd
{
class Communicator;
@@ -40,7 +42,7 @@
enum { UNKNOWN, DISCOVERABLE, NOT_DISCOVERABLE } meWasDiscoverable;
static BluetoothServer *spServer;
- BluetoothServerImpl *mpImpl;
+ boost::scoped_ptr<BluetoothServerImpl> mpImpl;
virtual void SAL_CALL run();
void cleanupCommunicators();
--
To view, visit https://gerrit.libreoffice.org/2458
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ac2cca7e24e6cc1b47b42c2d42bc7caee91b559
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Markus Mohrhard <markus.mohrhard@googlemail.com>
Context
- [PATCH] coverity#988423: fix memory leak · Markus Mohrhard (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.