[wdmaudiodev] Bug in MSVAD sample, or misunderstanding?

  • From: "Chris Edgington" <chris.edgington@xxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sat, 5 Oct 2002 13:55:06 -0500

In the msvad sample in the XP DDK, in basedma.cpp, the following code
exists for the FreeBuffer method:

    if ( m_pvDmaBuffer )
    {
        ExFreePool( m_pvDmaBuffer );
        m_ulDmaBufferSize = 0;
    }

Am I missing something, or should m_pvDmaBuffer be set to NULL after the
free? This has the potential of being called to free a NULL pointer,
right?

Thanks,
-Chris

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: