Changeset 1113 for trunk/dll


Ignore:
Timestamp:
Aug 24, 2008, 5:24:19 AM (17 years ago)
Author:
Gregg Young
Message:

Use pszDisplayName for display in dirsize.c change free code to free it; fix memory leak in dirsize. (Ticket 269)

Location:
trunk/dll
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1102 r1113  
    648648  case UM_SETUP:
    649649#   ifdef FORTIFY
    650     DbgMsg(pszSrcFile, __LINE__, "UM_SETUP hwnd %p TID %u", hwnd, GetTidForThread());   // 18 Jul 08 SHL fixme
     650    //DbgMsg(pszSrcFile, __LINE__, "UM_SETUP hwnd %p TID %u", hwnd, GetTidForThread()); // 18 Jul 08 SHL fixme
    651651    Fortify_EnterScope();
    652652#   endif
  • trunk/dll/dirsize.c

    r1105 r1113  
    5959#include "errutil.h"                    // Dos_Error...
    6060#include "strutil.h"                    // GetPString
     61#include "filldir.h"                    // EmptyCnr...
    6162#include "fm3dll.h"
    6263
     
    363364    pci->pszDisplayName = xstrdup(szBuf, pszSrcFile, __LINE__);
    364365    // use DisplayName for display hopefully fixes "strlen" trap 02 AUG 08 GKY
    365     if (pci->pszDisplayName)
     366    if (pci->pszDisplayName) {
     367#     ifdef FORTIFY
     368      Fortify_ChangeScope(pci->pszDisplayName, -1);
     369      Fortify_ChangeScope(pci->pszFileName, -1);
     370#     endif
    366371      WinSendMsg(hwndCnr, CM_INVALIDATERECORD, MPFROMP(&pci), MPFROM2SHORT(1, 0));
     372    }
    367373    isroot = FALSE;
    368374  }
     
    10161022  case WM_DESTROY:
    10171023    pState = INSTDATA(hwnd);
     1024    EmptyCnr(hwnd);
    10181025    if (pState) {
    10191026      pState->chStopFlag = (BYTE)0xff;
  • trunk/dll/filldir.c

    r1104 r1113  
    16411641  }
    16421642
     1643  if (pci->pszDisplayName &&
     1644      pci->pszDisplayName != NullStr &&
     1645      pci->pszDisplayName != pci->pszFileName &&
     1646      pci->pszDisplayName != strrchr(pci->pszFileName, '\\') &&
     1647      pci->pszDisplayName != strrchr(pci->pszFileName, '\\') + 1) {
     1648    psz = pci->pszDisplayName;
     1649    pci->pszDisplayName = NULL;         // for debug
     1650    free(psz);
     1651}
     1652
    16431653  if (pci->pszFileName && pci->pszFileName != NullStr) {
    16441654    psz = pci->pszFileName;
Note: See TracChangeset for help on using the changeset viewer.