---
name: "freeptype"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/freeptype"
---

# freeptype(3)

free a ptype\_list

## NAME

freeptype - free a **ptype\_list**

## SYNOPSYS

```
#include "mut.h"
ptype_list ∗freeptype(pt)
ptype_list ∗pt;
```

## PARAMETER

- *pt*

  Pointer to the ptype list to be freed

## DESCRIPTION

**freeptype** frees the **ptype\_list** pointed to by *pt*. All the elements of the list are put back in the list of free blocks.

## EXAMPLE

```
#include "mut.h"
void free_from(c, i) /∗ erase list from ith element ∗/
ptype_list ∗c;
int i;
{
ptype_list ∗t;
	while (i--)
		c = c->NEXT;
	t = c->NEXT, c->NEXT = NULL;
	freeptype(t);
}
```

## SEE ALSO

**mbk**(1), [**ptype**(3)](/ptype/3.md), [**addptype**(3)](/addptype/3.md), [**getptype**(3)](/getptype/3.md), [**delptype**(3)](/delptype/3.md).
