Minor cleanup

This commit is contained in:
2025-10-06 13:12:00 -06:00
parent f52ca2803f
commit f5aa320800
3 changed files with 8 additions and 11 deletions

View File

@@ -187,7 +187,7 @@ bool Handles::duplicateTo(HANDLE src, Handles &dst, HANDLE &out, uint32_t desire
uint32_t effAccess = (options & DUPLICATE_SAME_ACCESS) ? meta.grantedAccess : (desiredAccess & meta.grantedAccess);
const uint32_t flags = (inherit ? HANDLE_FLAG_INHERIT : 0);
// Reuse the same handle if duplicating within the same table and no changes
// Reuse the same handle if duplicating with DUPLICATE_CLOSE_SOURCE within the same table and no changes
if (&dst == this && closeSource && effAccess == meta.grantedAccess && flags == meta.flags) {
out = src;
return true;