Ignore:
Timestamp:
Apr 29, 2002, 7:05:30 PM (23 years ago)
Author:
sandervl
Message:

PH: memory leak fixes; extra checks for NULL pointers; CreateProcess changes for debug option; GetModuleFileName doesn't count 0 terminator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/handlenames.cpp

    r8216 r8327  
    1 /* $Id: handlenames.cpp,v 1.4 2002-04-08 11:22:47 phaller Exp $ */
     1/* $Id: handlenames.cpp,v 1.5 2002-04-29 17:05:29 sandervl Exp $ */
    22
    33/*
     
    117117HandleNames::HandleNames(void)
    118118{
     119  // Note: as handleNameMgr is a static object, the
     120  // destructor will never be called, this memory is leaked.
    119121  pSymbolicLinks = new CLinearList();
    120122}
     
    333335    rc = FALSE;
    334336  else
     337  {
    335338    // 2 - remove the link
    336339    pSymbolicLinks->removeObject(pHandleName);
     340   
     341    if (NULL != pHandleName->pszSymbolicLink )
     342      free( pHandleName->pszSymbolicLink );
     343   
     344    if (NULL != pHandleName->pszTarget )
     345      free( pHandleName->pszTarget );
     346   
     347    free( pHandleName );
     348  }
    337349 
    338350  mtxHandleNameMgr.leave();
Note: See TracChangeset for help on using the changeset viewer.