Kaydet (Commit) 73db878b authored tarafından Christophe JAILLET's avatar Christophe JAILLET Kaydeden (comit) Eike Rathke

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
üst 5cfd4e92
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment