Hello Alistair,

Alexandre Julliard wrote:
> Module: wine
> Branch: master
> Commit: 264be58812fedf9a066bac521f9fff5821759890
> URL:    
> http://source.winehq.org/git/wine.git/?a=commit;h=264be58812fedf9a066bac521f9fff5821759890
> 
> Author: Alistair Leslie-Hughes <[EMAIL PROTECTED]>
> Date:   Tue Mar 25 14:19:10 2008 +1100
> 
> msxml3: Added support for SAXXMLReader.
Smatch is complaining about SAXXMLReader_create() loosing memory.

HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj)
{
    saxreader *reader;

    TRACE("(%p,%p)\n", pUnkOuter, ppObj);

    reader = HeapAlloc( GetProcessHeap(), 0, sizeof (*reader) );
    if( !reader )
        return E_OUTOFMEMORY;

    reader->lpVtbl = &saxreader_vtbl;
    reader->ref = 1;

    TRACE("returning iface %p\n", *ppObj);
    return S_OK;
}

reader is a local variable with function scope. Stuff gets assigned to
it but there is no usage of it nor is it "exported" aka made visible
outside of the function. Is there something missing here?

bye
        michael

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to