ldns(3)

πŸ“¦
version 1.9.2 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ldns(3) β€” the free-a-key girlies' page πŸ’–

okay bestie, so this is a page from the Library Functions Manual for ldns β€” yeah, the DNS library, the one that lives over at NLnet Labs. and today's episode is all about letting go. freeing. releasing. the whole "we're not keeping that key anymore" arc. it's giving closure, honestly. πŸ¦‹


✨ NAME ✨

ldns_key_free, ldns_key_deep_free, ldns_key_list_free β€” free a ldns_key

like. that's it. that's the whole job. three little functions whose entire personality is "this memory? not mine anymore." iconic behaviour tbh. πŸ’…


🌸 SYNOPSIS 🌸

#include <stdint.h>
#include <stdbool.h>

#include <ldns/ldns.h>

void ldns_key_free(ldns_key *key);

void ldns_key_deep_free(ldns_key *key);

void ldns_key_list_free(ldns_key_list *key_list);

look at those signatures, so clean, so void, no return values, no drama. they just do the thing and dip. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the tea on each one, and bestie you gotta pay attention because the difference between these two key functions is literally the whole point.

  • ldns_key_free() β€” frees a key structure, but not its internal data structures. so like... the outer shell goes, the insides stay. it's a shallow free, no cap.
    • key: the key object to free
  • ldns_key_deep_free() β€” frees a key structure and all its internal data structures, except the data set by ldns_key_set_external_key(). so this one goes all the way in. it's thorough. it's committed. it's main character energy. πŸ”₯
    • key: the key object to free
⚠️ ok so notice that exception up there β€” the data set by ldns_key_set_external_key() does not get freed by ldns_key_deep_free(). so don't be out here expecting it to clean that up for you, bestie. that's on you. πŸ™ˆ
  • ldns_key_list_free() β€” Frees a key list structure. whole list? gone. poof.
    • key_list: the key list object to free

πŸ‘‘ AUTHOR πŸ‘‘

The ldns team at NLnet Labs. (they built all this, we just vibe with it. respect. πŸ’œ)


πŸ› REPORTING BUGS πŸ›

found a bug? do NOT gatekeep it, bestie, please. tell them:

fr fr, they wanna know. 🫢


Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

πŸ’€ read that again. NO warranty. none. zero. not even the implied ones. it's giving "you're on your own, girlie" but in a legally binding way.

🌈 SEE ALSO 🌈

(the RFCs are the lore, iykyk πŸ“š)


🧚 REMARKS 🧚

This manpage was automatically generated from the ldns source code. so like, a robot wrote it. and now a girl on the internet rewrote the robot's version. we're all just out here doing our part. ✨


and that's the page, bestie!! πŸŽ€ this one came from the ldns(3) manual, dated 30 May 2006 β€” yeah it's old, it's vintage, it's basically a classic at this point, and it's still out here freeing keys for you. go forth and free responsibly. mwah. πŸ’–πŸŒΈ