Changeset 1513


Ignore:
Timestamp:
Apr 13, 2010, 10:38:41 PM (16 years ago)
Author:
Steven Levine
Message:

Avoid referencing buffer after freeing dcd

Location:
trunk/dll
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1498 r1513  
    22232223      FreeList(dcd->lastselection);
    22242224      WinSendMsg(dcd->hwndCnr, UM_CLOSE, MPVOID, MPVOID);
     2225      WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);    // 13 Apr 10 SHL Set NULL before freeing dcd
    22252226      free(dcd);
    22262227#     ifdef FORTIFY
    22272228      Fortify_LeaveScope();
    22282229#     endif
    2229       WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);
    22302230    }
    22312231    if (!PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID))
  • trunk/dll/collect.c

    r1498 r1513  
    10721072      WinSendMsg(dcd->hwndCnr, UM_CLOSE, MPVOID, MPVOID);
    10731073      FreeList(dcd->lastselection);
     1074      WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);    // 13 Apr 10 SHL Set NULL before freeing dcd
    10741075      free(dcd);
    10751076#     ifdef FORTIFY
    10761077      Fortify_LeaveScope();
    10771078#     endif
    1078       WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);
    10791079    }
    10801080    DosPostEventSem(CompactSem);
  • trunk/dll/dircnrs.c

    r1498 r1513  
    11951195                        SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER);
    11961196      FreeList(dcd->lastselection);
     1197      WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);    // 13 Apr 10 SHL Set NULL before freeing dcd
    11971198      xfree(dcd, pszSrcFile, __LINE__);
    1198       WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);
    11991199      DosPostEventSem(CompactSem);
    12001200    }
  • trunk/dll/treecnr.c

    r1506 r1513  
    998998      WinSendMsg(dcd->hwndCnr,
    999999                 UM_CLOSE, MPFROMLONG(dcd->dontclose != FALSE), MPVOID);
     1000      WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);    // 13 Apr 10 SHL Set NULL before freeing dcd
    10001001      free(dcd);
    10011002#     ifdef FORTIFY
    10021003      Fortify_LeaveScope();
    10031004#     endif
    1004       WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);
    10051005    }
    10061006    DosPostEventSem(CompactSem);
Note: See TracChangeset for help on using the changeset viewer.