summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2012-07-14 16:00:50 +0200
committerEike Rathke <erack@redhat.com>2012-07-17 00:21:59 +0200
commit73db878b17c6f57be5559ac5f7780b43ab690559 (patch)
tree9262ad1dc2439209f4a323db08878bbee8fe11e0 /dtrans/source/win32
parent5cfd4e920023ecb6caa9061bc0a52ea03def83c6 (diff)
Correct check after memory allocation.
ppenum is already tested for NULL at the beginning of the function. What is intended here is to know if the memory allocation succeeded. Found by cppcheck. Change-Id: I31a3bed93b5dfe1a4d384478267f7c8cc0421181
Diffstat (limited to 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 858a33703c29..ec3d20189685 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -832,7 +832,7 @@ STDMETHODIMP CEnumFormatEtc::Clone( IEnumFORMATETC** ppenum )
return E_INVALIDARG;
*ppenum = new CEnumFormatEtc( m_lpUnkOuter, m_FormatEtcContainer );
- if ( NULL != ppenum )
+ if ( NULL != *ppenum )
static_cast< LPUNKNOWN >( *ppenum )->AddRef( );
return ( NULL != *ppenum ) ? S_OK : E_OUTOFMEMORY;