mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 00:27:16 +00:00
Revert "advapi32: Free descriptor if it isn't returned from GetSecurityInfo().".
This reverts commit dbd76575ef
.
According to MSDN, ppSecurityDescriptor must not be NULL if any of the
SID or ACL parameters are non-NULL. This is wrong, and native
GetSecurityInfo will happily return those pointers, leaving one unable
to free the original security descriptor.
This commit is contained in:
parent
539da1b073
commit
72158ac286
|
@ -3118,8 +3118,11 @@ DWORD WINAPI GetSecurityInfo(
|
||||||
}
|
}
|
||||||
if (ppSecurityDescriptor)
|
if (ppSecurityDescriptor)
|
||||||
*ppSecurityDescriptor = sd;
|
*ppSecurityDescriptor = sd;
|
||||||
else
|
|
||||||
LocalFree(sd);
|
/* The security descriptor (sd) cannot be freed if ppSecurityDescriptor is
|
||||||
|
* NULL, because native happily returns the SIDs and ACLs that are requested
|
||||||
|
* in this case.
|
||||||
|
*/
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue