---
name: "gd_free_entry_strings"
section: "3"
platform: "linux"
package: "libgetdata-doc"
version: "0.11.0-15"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gd_free_entry_strings"
---

# gd\_free\_entry\_strings(3)

free strings in a GetData gd\_entry\_t object

## NAME

gd\_free\_entry\_strings — free strings in a GetData gd\_entry\_t object

## SYNOPSIS

**#include \<getdata.h\>**

**gd\_entry\_t \*gd\_free\_entry\_strings(gd\_entry\_t \****entry***);**

## DESCRIPTION

The **gd\_free\_entry\_strings**() function frees the character strings found in the gd\_entry\_t object *entry* which were previously allocated by a call to [**gd\_entry**(3)](/gd_entry/3.md). After freeing a string, the associated pointer is set to NULL.  If *entry* is NULL, this function does nothing.

If non-NULL, *entry* must point to a valid and properly initialised gd\_entry\_t object, such as that returned by [**gd\_entry**(3)](/gd_entry/3.md). By default, strings are deallocated by calling [**free**(3)](/free/3.md) on each, but a different memory manager may be specified by calling [**gd\_alloc\_funcs**(3)](/gd_alloc_funcs/3.md) before calling this function.

See  [**gd\_entry**(3)](/gd_entry/3.md) for a description of the gd\_entry\_t data type.

## RETURN VALUE

The function **gd\_free\_entry\_strings**() always returns its input, *entry*.

## NOTES

This function is provided as a convenience only.  The caller may deallocate the strings in the **gd\_entry\_t** object provided by [**gd\_entry**(3)](/gd_entry/3.md) itself simply by calling the deallocator on the each initialised string member, if they prefer to do so.

## HISTORY

The **dirfile\_free\_entry\_strings**() function appeared in GetData-0.3.0.

In GetData-0.7.0, this function was renamed to **gd\_free\_entry\_strings**().

## SEE ALSO

[**gd\_alloc\_funcs**(3)](/gd_alloc_funcs/3.md), [**gd\_entry**(3)](/gd_entry/3.md)
