Author: dchapyshev
Date: Fri Sep 30 17:33:19 2016
New Revision: 72870
URL:
http://svn.reactos.org/svn/reactos?rev=72870&view=rev
Log:
[NTOS:FSRTL] Handle failure case
Modified:
trunk/reactos/ntoskrnl/fsrtl/name.c
Modified: trunk/reactos/ntoskrnl/fsrtl/name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Fri Sep 30 17:33:19 2016
@@ -294,7 +294,13 @@
if (!NT_SUCCESS(Status)) RtlRaiseStatus(Status);
/* Upcase the second string too */
- RtlUpcaseUnicodeString(&UpcaseName2, Name2, TRUE);
+ Status = RtlUpcaseUnicodeString(&UpcaseName2, Name2, TRUE);
+ if (!NT_SUCCESS(Status))
+ {
+ RtlFreeUnicodeString(&UpcaseName1);
+ RtlRaiseStatus(Status);
+ }
+
Name1 = &UpcaseName1;
Name2 = &UpcaseName2;