---
name: "openpam_free_envlist"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/openpam_free_envlist"
---

# openpam\_free\_envlist(3)

free an environment list

## NAME

**openpam\_free\_envlist** – free an environment list

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<security/pam\_appl.h\>**

**#include \<security/openpam.h\>**

*void*\

**openpam\_free\_envlist**(*char \*\*envlist*);

## DESCRIPTION

The **openpam\_free\_envlist**() function is a convenience function which frees all the environment variables in an environment list, and the list itself. It is suitable for freeing the return value from [pam\_getenvlist(3)](/pam_getenvlist/3.md).

## SEE ALSO

[pam(3)](/pam/3.md), [pam\_getenvlist(3)](/pam_getenvlist/3.md)

## STANDARDS

The **openpam\_free\_envlist**() function is an OpenPAM extension.

## AUTHORS

The **openpam\_free\_envlist**() function and this manual page were developed by Dag-Erling Smørgrav ⟨*des@des.dev*⟩.
