---
name: "mstl_init"
section: "3"
platform: "linux"
package: "libmseed-doc"
version: "2.19.8-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mstl_init"
---

# mstl\_init(3)

Initializing and freeing MSTraceList structures

## NAME

mstl\_init - Initializing and freeing MSTraceList structures

## SYNOPSIS

```
#include <libmseed.h>
MSTrace      *mstl_init ( MSTrace *mstl );
void          mstl_free ( MSTrace **ppmstl, flag freeprvtptr );
```

## DESCRIPTION

**mstl\_init** will initialize a MSTraceList structure.  If the *mstl* parameter is not NULL the structure will be cleared before being reallocated any memory allocated for associated MSTraceID and relate sub-structures will be freed.

**mstl\_free** will free all memory associated with a MSTraceList structure and set the structure pointer (\**ppmstl*) to 0.  If the *freeprvtptr* flag is true any memory pointed to by the *prvtptr* members of the MSTraceID or MSTraceSeg structures.

## RETURN VALUES

**mstl\_init** returns a pointer to the MSTraceList structure initialized on success or NULL on error.

## SEE ALSO

**[mstl\_addmsr(3)](/mstl_addmsr/3.md)**.

## AUTHOR

```
Chad Trabant
IRIS Data Management Center
```
