Don't free the memory for LParam in NtUserPeekMessage if called with PM_NOREMOVE flag.

svn path=/trunk/; revision=12800
This commit is contained in:
Filip Navara 2005-01-04 21:25:20 +00:00
parent c0f005d179
commit fca5c9e765

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: message.c,v 1.79 2004/12/29 19:55:01 gvg Exp $
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -835,7 +835,7 @@ NtUserPeekMessage(PNTUSERGETMESSAGEINFO UnsafeInfo,
}
Info.Msg.lParam = (LPARAM) UserMem;
}
if (Msg.FreeLParam && 0 != Msg.Msg.lParam)
if (RemoveMsg && Msg.FreeLParam && 0 != Msg.Msg.lParam)
{
ExFreePool((void *) Msg.Msg.lParam);
}