Alistair Leslie-Hughes : msxml3: Added support for SAXXMLReader.
Lei Zhang
thestig at google.com
Tue Mar 25 15:51:18 CDT 2008
On Tue, Mar 25, 2008 at 1:44 PM, James Hawkins <truiken at gmail.com> wrote:
> On Tue, Mar 25, 2008 at 3:36 PM, Michael Stefaniuc <mstefani at redhat.com> wrote:
> > 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 <leslie_alistair at hotmail.com>
> > > 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;
>
> ----------- added -----------
>
> *ppObj = (LPVOID *)reader;
>
> ----------- end ------------
>
>
> >
> > 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?
> >
>
> There should probably also be a check for NULL ppObj.
>
> --
> James Hawkins
>
>
>
BTW, on systems without libxml2-dev, saxreader.c does not compile.
More information about the wine-devel
mailing list