summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-10-27 15:11:25 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-10-27 15:30:59 +0200
commit6a12a9e941283fe32d7714d4aee694c397996c3a (patch)
tree2c83c288b5c4fa23ec60cc4aad99f0fd7988f9aa /embeddedobj
parent2272b7e876dade3359b9f1fd1ae8a24e391bb8e5 (diff)
tdf#120703 PVS: V530 The return value of function is required to be utilized
Change-Id: Ifc170a45e25b3fd5b7f561cc50afb6452bb359bd Reviewed-on: https://gerrit.libreoffice.org/62420 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index bcf2600236c1..f9440f651bb2 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -913,8 +913,8 @@ void OleComponent::InitEmbeddedCopyOfLink( OleComponent const * pOleLinkComponen
if ( SUCCEEDED( hr ) && aMonType == MKSYS_FILEMONIKER )
{
ComSmart< IMalloc > pMalloc;
- CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak
- OSL_ENSURE( pMalloc, "CoGetMalloc() failed!" );
+ hr = CoGetMalloc( 1, &pMalloc ); // if fails there will be a memory leak
+ OSL_ENSURE(SUCCEEDED(hr) && pMalloc, "CoGetMalloc() failed!");
LPOLESTR pOleStr = nullptr;
hr = pOleLink->GetSourceDisplayName( &pOleStr );