---
name: "nutscan_free_ip_ranges"
section: "3"
platform: "linux"
package: "nut"
version: "2.8.5-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nutscan_free_ip_ranges"
---

# nutscan\_free\_ip\_ranges(3)

Free contents of a \`nutscan\_ip\_range\_list\_t\` structure populated (and optionally created) by \`nutscan\_init\_ip\_ranges()\` and, more importantly, filled by a series of \`nutscan\_add\_ip\_range()\` calls.

## NAME

nutscan\_free\_ip\_ranges - Free contents of a \`nutscan\_ip\_range\_list\_t\` structure populated (and optionally created) by \`nutscan\_init\_ip\_ranges()\` and, more importantly, filled by a series of \`nutscan\_add\_ip\_range()\` calls.

## SYNOPSIS

```
        #include <nut-scan.h>
        void nutscan_free_ip_ranges(nutscan_ip_range_list_t *irl);
```

## DESCRIPTION

The **nutscan\_free\_ip\_ranges()** function can free a nutscan\_ip\_range\_list\_t structure. Doing so, it frees the whole linked list of nutscan\_ip\_range\_t entries, and zeroes out helper properties.

The structure itself is not freed (as it can be a statically allocated variable on the stack), and can be re-used for a new list if needed.

The caller must ultimately free the structure object if it was allocated dynamically (e.g. by originally calling nutscan\_init\_ip\_ranges(NULL)).

## NOTES

Technically, the function is currently defined in *nutscan-ip.h* file.

## SEE ALSO

[**nutscan\_init\_ip\_ranges**(3)](/nutscan_init_ip_ranges/3.md), [**nutscan\_add\_ip\_range**(3)](/nutscan_add_ip_range/3.md), [**nutscan\_stringify\_ip\_ranges**(3)](/nutscan_stringify_ip_ranges/3.md), [**nutscan\_cidr\_to\_ip**(3)](/nutscan_cidr_to_ip/3.md), [**nutscan\_ip\_ranges\_iter\_init**(3)](/nutscan_ip_ranges_iter_init/3.md), [**nutscan\_ip\_ranges\_iter\_inc**(3)](/nutscan_ip_ranges_iter_inc/3.md)
