acl: fix memory leak in removeEntry

According to manpage acl_get_qualifier(3) the void * returned by this function could be allocated on the heap.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
Ophestra 2024-07-15 12:40:29 +09:00
parent 289e681c41
commit 7d96b0bf35
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

1
acl.go
View File

@ -156,6 +156,7 @@ func (a *acl) removeEntry(tt C.acl_tag_t, tq int) error {
return err
} else {
q = *(*int)(rq)
C.acl_free(rq)
}
// delete on match