NUTSCAN_FREE_IP_RANG(3)

πŸ’… NUTSCAN_FREE_IP_RANG(3) β€” the cleanup era πŸ’–

okay so bestie, we're in the NUT Manual and this page is literally all about saying goodbye to your IP ranges properly. no leaks, no mess, just ✨closure✨.


πŸŽ€ NAME πŸŽ€

nutscan_free_ip_ranges β€” it frees the contents of a nutscan_ip_range_list_t structure, the one that got populated (and optionally created) by nutscan_init_ip_ranges() and β€” more importantly β€” filled by a whole series of nutscan_add_ip_range() calls. it's the cleanup bestie. the one who stays after the party 🫢


✨ SYNOPSIS ✨

#include <nut-scan.h>

void nutscan_free_ip_ranges(nutscan_ip_range_list_t *irl);

πŸ¦‹ DESCRIPTION πŸ¦‹

so nutscan_free_ip_ranges() can free a nutscan_ip_range_list_t structure. and like, when it does that? it frees the whole linked list of nutscan_ip_range_t entries, and zeroes out helper properties. every single node. gone. slay πŸ’…

heads up though: the structure itself is not freed β€” because it can totally be a statically allocated variable on the stack, and we are not out here freeing stack memory, no ma'am 😭

and because the structure is still there, it can be re-used for a new list if needed. recycling icon behavior, we love to see it 🌈

the caller must ultimately free the structure object if it was allocated dynamically (e.g. by originally calling nutscan_init_ip_ranges(NULL)). that part is on you, bestie β€” this function handles the contents, not the container πŸŽ€


πŸ“ NOTES πŸ“

technically (iykyk), the function is currently defined in nutscan-ip.h file. not nut-scan.h. don't come for me, that's just what the docs say πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


Network UPS Tools 2.8.5 🌸 06/21/2026 🌸 and yeah, the page itself is NUTSCAN_FREE_IP_RANG(3) β€” mwah, go free those ranges, you icon πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from
  • arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms