summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 04:03:48 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 06:52:00 +0100
commitfca5e0992f153e1e821d4dd9bd35c11c39cdb6ec (patch)
tree77bed45a6515c1928dac0e838d7b69a5229f6547 /extensions
parentcoverity#982974: fix memory leak (diff)
downloadcore-fca5e0992f153e1e821d4dd9bd35c11c39cdb6ec.tar.gz
core-fca5e0992f153e1e821d4dd9bd35c11c39cdb6ec.zip
coverity#982975 and more: fix memory leaks
Change-Id: I4c147ea03eb4d5d7c926ec1cccbd344ff28c77d7
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/plugin/unx/plugcon.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx
index cc0d3b53b089..7683825eabad 100644
--- a/extensions/source/plugin/unx/plugcon.cxx
+++ b/extensions/source/plugin/unx/plugcon.cxx
@@ -114,7 +114,9 @@ MediatorMessage* PluginConnector::Transact( const char* pFunction,
va_start( ap, nFunctionLen );
sal_uLong nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap );
va_end( ap );
- return TransactMessage( nSize, pBuffer );
+ MediatorMessage* pRet = TransactMessage( nSize, pBuffer );
+ delete[] pBuffer;
+ return pRet;
}
MediatorMessage* PluginConnector::Transact( sal_uInt32 nFunction, ... )
@@ -125,7 +127,9 @@ MediatorMessage* PluginConnector::Transact( sal_uInt32 nFunction, ... )
va_start( ap, nFunction );
sal_uLong nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap );
va_end( ap );
- return TransactMessage( nSize, pBuffer );
+ MediatorMessage* pRet = TransactMessage( nSize, pBuffer );
+ delete[] pBuffer;
+ return pRet;
}
sal_uLong PluginConnector::Send( sal_uInt32 nFunction, ... )
@@ -136,7 +140,9 @@ sal_uLong PluginConnector::Send( sal_uInt32 nFunction, ... )
va_start( ap, nFunction );
sal_uLong nSize = FillBuffer( pBuffer, (char*)&nFunction, sizeof( nFunction ), ap );
va_end( ap );
- return SendMessage( nSize, pBuffer );
+ sal_uLong nRet = SendMessage( nSize, pBuffer );
+ delete[] pBuffer;
+ return nRet;
}
void PluginConnector::Respond( sal_uLong nID,
@@ -150,6 +156,7 @@ void PluginConnector::Respond( sal_uLong nID,
sal_uLong nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap );
va_end( ap );
SendMessage( nSize, pBuffer, nID | ( 1 << 24 ) );
+ delete[] pBuffer;
}
MediatorMessage* PluginConnector::WaitForAnswer( sal_uLong nMessageID )