From 23f124bf95cbd395d9964502d9c1a6d28a6ff203 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 2 Mar 2013 12:04:22 +0100 Subject: coverity#983201: fix memory leak Change-Id: I0c6a4ed147c6afc1dcabaa33833b7ca50afb4607 --- toolkit/source/awt/vclxmenu.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'toolkit/source') diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index fbda6cd1e5ca..01a6895eefb4 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -528,9 +528,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref // if the popup men is not created by stardiv.Toolkit.VCLXPopupMenu if( !aRef.is() ) { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pNewRef = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > ; - *pNewRef = new VCLXPopupMenu( (PopupMenu*)pMenu ); - aRef = *pNewRef; + aRef = new VCLXPopupMenu( (PopupMenu*)pMenu ); } } return aRef; -- cgit