ACL_FREE(3)

πŸ“¦
version 2.4.0 Β· 2 versions
  • 2.4.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 15.1 Β· freebsd 14.5, freebsd 15.1
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– ACL_FREE β€” release memory allocated to an ACL data object πŸ’–

okay bestie, welcome to acl_free(3), straight out of the Library Functions Manual ✨ it lives in the Linux Access Control Lists library β€” that's libacl, and you link it with -lacl. πŸŽ€


✨ SYNOPSIS ✨

#include <sys/types.h>
#include <sys/acl.h>

int
acl_free(void *obj_p);

🧚 DESCRIPTION 🧚

so basically, acl_free() frees any releasable memory that's currently allocated to the ACL data object that obj_p points at. no cap, that's the whole job. 🫢

and the way that obj_p is flexible?? iconic. it can point at:

  • an ACL
  • an ACL entry qualifier
  • a pointer to a string that was allocated by acl_to_text()

so like, three totally different vibes, one cleanup function. slay. πŸ’…


πŸ‘‘ RETURN VALUE πŸ‘‘

acl_free() returns the value 0 if it's successful ✨ otherwise it returns -1, and the global variable errno gets set to tell you what went wrong. not me being dramatic but like. respect the errno. 😭


πŸ’€ ERRORS πŸ’€

if any of these conditions happen, acl_free() returns -1 and sets errno to the matching value:

  • [EINVAL] β€” the value of the argument obj_p is invalid. πŸ’€
bestie this is the only error listed here. if you see EINVAL, your obj_p is simply not it. πŸ™ˆ

🌈 STANDARDS 🌈

IEEE Std 1003.1e draft 17 (β€œPOSIX.1e”, abandoned) β€” yeah it's abandoned, don't ask, we don't talk about it, it's giving ghosted. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ AUTHOR πŸŽ€

Derived from the FreeBSD manual pages written by Robert N M Watson <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher <andreas.gruenbacher@gmail.com>. absolute legends, we stan. πŸ‘‘


and that's the whole page, bestie!! this one came from the Linux ACL crew and it's dated March 23, 2002, filed under ACL_FREE(3) in the Library Functions Manual. go free your memory, you're doing amazing sweetie πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from