Kaydet (Commit) 75082a3b authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Michael Meeks

coverity#988423: fix memory leak

Change-Id: I3ac2cca7e24e6cc1b47b42c2d42bc7caee91b559
Reviewed-on: https://gerrit.libreoffice.org/2458Reviewed-by: 's avatarMichael Meeks <michael.meeks@suse.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@suse.com>
üst aa8091bc
......@@ -586,7 +586,7 @@ BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators )
mpCommunicators( pCommunicators )
{
#ifdef LINUX_BLUETOOTH
mpImpl = new BluetoothServerImpl();
mpImpl.reset(new BluetoothServerImpl());
#endif
(void) mpImpl; // Avoid warning: private field 'mpImpl' is not used
}
......
......@@ -12,6 +12,8 @@
#include <osl/thread.hxx>
#include <vector>
#include <boost/scoped_ptr.hpp>
namespace sd
{
class Communicator;
......@@ -40,7 +42,7 @@ namespace sd
enum { UNKNOWN, DISCOVERABLE, NOT_DISCOVERABLE } meWasDiscoverable;
static BluetoothServer *spServer;
BluetoothServerImpl *mpImpl;
boost::scoped_ptr<BluetoothServerImpl> mpImpl;
virtual void SAL_CALL run();
void cleanupCommunicators();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment