mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
don't leak resources on failure
svn path=/trunk/; revision=13220
This commit is contained in:
parent
31067aaecb
commit
063e4f41a5
1 changed files with 7 additions and 0 deletions
|
@ -115,6 +115,13 @@ RtlCaptureUnicodeString(OUT PUNICODE_STRING Dest,
|
|||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(Dest->Buffer);
|
||||
Dest->Buffer = NULL;
|
||||
Dest->Length = Dest->MaximumLength = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue