sd/source/ui/remotecontrol/BluetoothServer.cxx | 2 +- sd/source/ui/remotecontrol/BluetoothServer.hxx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
New commits: commit 75082a3bf7401fad10c2806a3f7ce268160d7ab1 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Feb 27 21:31:22 2013 +0100 coverity#988423: fix memory leak Change-Id: I3ac2cca7e24e6cc1b47b42c2d42bc7caee91b559 Reviewed-on: https://gerrit.libreoffice.org/2458 Reviewed-by: Michael Meeks <michael.me...@suse.com> Tested-by: Michael Meeks <michael.me...@suse.com> 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 @@ 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 } 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 @@ 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits