Author: janderwald
Date: Fri Aug 21 12:30:05 2009
New Revision: 42821
URL:
http://svn.reactos.org/svn/reactos?rev=42821&view=rev
Log:
- Don't touch the freed buffer in case of an error
- Found by Amine Khaldi
Modified:
trunk/reactos/ntoskrnl/io/iomgr/deviface.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/deviface…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1] Fri Aug 21 12:30:05 2009
@@ -920,7 +920,10 @@
DPRINT("ZwSetValueKey() failed with status 0x%08lx\n", Status);
ExFreePool(SymbolicLinkName->Buffer);
}
- SymbolicLinkName->Buffer[1] = '?';
+ else
+ {
+ SymbolicLinkName->Buffer[1] = '?';
+ }
ZwClose(SubKey);
ZwClose(InterfaceKey);