Author: pschweitzer
Date: Sat Oct 24 08:43:54 2015
New Revision: 69664
URL:
http://svn.reactos.org/svn/reactos?rev=69664&view=rev
Log:
[KERNEL32]
Don't pass uninit pointer address to CsrFreeCaptureBuffer()
CID 1223181
Modified:
trunk/reactos/dll/win32/kernel32/client/vdm.c
Modified: trunk/reactos/dll/win32/kernel32/client/vdm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] Sat Oct 24 08:43:54 2015
@@ -101,7 +101,7 @@
{
NTSTATUS Status;
PBASE_CHECK_VDM CheckVdm = &ApiMessage->Data.CheckVDMRequest;
- PCSR_CAPTURE_BUFFER CaptureBuffer;
+ PCSR_CAPTURE_BUFFER CaptureBuffer = NULL;
PWCHAR CurrentDir = NULL;
PWCHAR ShortAppName = NULL;
PWCHAR ShortCurrentDir = NULL;
@@ -517,7 +517,7 @@
if (AnsiReserved) RtlFreeHeap(RtlGetProcessHeap(), 0, AnsiReserved);
/* Free the capture buffer */
- CsrFreeCaptureBuffer(CaptureBuffer);
+ if (CaptureBuffer) CsrFreeCaptureBuffer(CaptureBuffer);
/* Free the current directory, if it was allocated here, and its short path */
if (ShortCurrentDir) RtlFreeHeap(RtlGetProcessHeap(), 0, ShortCurrentDir);