Ignore:
Timestamp:
Sep 9, 2009, 7:08:31 PM (16 years ago)
Author:
vladest
Message:

Reworked double free check to make sure the patch will not harm other apps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibmsgtranslate.cpp

    r21308 r21341  
    221221            winMsg->lParam  = packet->lParam;
    222222            if (fMsgRemoved == MSG_REMOVE)
    223                 OSLibCleanupPacket(teb, packet, winMsg);
     223            {
     224                /* avoid double free */
     225                if (os2Msg->mp2)
     226                {
     227                    OSLibCleanupPacket(teb, packet, winMsg);
     228                    os2Msg->mp2 = NULL;
     229                }
     230#ifdef DEBUG
     231                else
     232                    dprintf(("Trying to free NULL in WinMsgTranslate"));
     233#endif
     234            }
    224235            if(win32wnd) RELEASE_WNDOBJ(win32wnd);
    225236            return TRUE;
Note: See TracChangeset for help on using the changeset viewer.