mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 08:08:56 +00:00
[RTL]
Don't allocate an extra privilege entry when not required. Still doesn't fix issue. svn path=/trunk/; revision=58949
This commit is contained in:
parent
f96e0193f4
commit
9818ea06e5
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <rtl.h>
|
#include <rtl.h>
|
||||||
|
|
||||||
#define NDEBUG
|
//#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* FUNCTIONS ***************************************************************/
|
/* FUNCTIONS ***************************************************************/
|
||||||
|
@ -138,7 +138,7 @@ RtlAcquirePrivilege(IN PULONG Privilege,
|
||||||
* new privileges (big enough, after old privileges memory area)
|
* new privileges (big enough, after old privileges memory area)
|
||||||
*/
|
*/
|
||||||
State = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(RTL_ACQUIRE_STATE) + sizeof(TOKEN_PRIVILEGES) +
|
State = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(RTL_ACQUIRE_STATE) + sizeof(TOKEN_PRIVILEGES) +
|
||||||
NumPriv * sizeof(LUID_AND_ATTRIBUTES));
|
(NumPriv - ANYSIZE_ARRAY) * sizeof(LUID_AND_ATTRIBUTES));
|
||||||
if (!State)
|
if (!State)
|
||||||
{
|
{
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
|
Loading…
Reference in a new issue