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/directory.cpp

    r7935 r8327  
    1 /* $Id: directory.cpp,v 1.45 2002-02-16 18:07:20 sandervl Exp $ */
     1/* $Id: directory.cpp,v 1.46 2002-04-29 17:05:29 sandervl Exp $ */
    22
    33/*
     
    733733    LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name );
    734734    LPSTR extA  = HEAP_strdupWtoA( GetProcessHeap(), 0, ext );
     735 
    735736    dprintf(("SearchPathA %s %s %s", pathA, nameA, extA));
    736737    DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name );
    737     HeapFree( GetProcessHeap(), 0, extA );
    738     HeapFree( GetProcessHeap(), 0, nameA );
    739     HeapFree( GetProcessHeap(), 0, pathA );
     738 
     739    if (NULL != extA)
     740      HeapFree( GetProcessHeap(), 0, extA );
     741 
     742    if (NULL != nameA)
     743      HeapFree( GetProcessHeap(), 0, nameA );
     744 
     745    if (NULL != pathA)
     746      HeapFree( GetProcessHeap(), 0, pathA );
     747 
    740748    if (!ret) return 0;
    741749
Note: See TracChangeset for help on using the changeset viewer.