Skip to content

Commit

Permalink
Plug the leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Dec 9, 2024
1 parent d6250c5 commit 39a57ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions windows/Sources/Sandbox/ProcThreadAttributes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ class SecurityCapabilitiesProcThreadAttribute: ProcThreadAttribute {
)
}

deinit {
self.securityCapabilities.deallocate()
}

func apply(_ attributeList: inout LPPROC_THREAD_ATTRIBUTE_LIST) throws {
try updateProcThreadAttribute(
attributeList: &attributeList,
Expand All @@ -103,6 +107,10 @@ class LessPrivilegedAppContainerProcThreadAttribute: ProcThreadAttribute {
self.enabled.pointee = 1
}

deinit {
self.enabled.deallocate()
}

func apply(_ attributeList: inout LPPROC_THREAD_ATTRIBUTE_LIST) throws {
try updateProcThreadAttribute(
attributeList: &attributeList,
Expand Down

0 comments on commit 39a57ae

Please sign in to comment.