NeoMutt  2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
List Data Free API

Prototype for a function to free List data. More...

Functions

void attachmatch_free (void **ptr)
 Free an AttachMatch - Implements list_free_t -.

Detailed Description

Prototype for a function to free List data.

Parameters
[out]ptrData to free

Function Documentation

◆ attachmatch_free()

void attachmatch_free ( void ** ptr)

Free an AttachMatch - Implements list_free_t -.

Parameters
ptrAttachMatch to free
Note
We don't free minor because it is either a pointer into major, or a static string.

Definition at line 63 of file commands.c.

64{
65 if (!ptr || !*ptr)
66 return;
67
68 struct AttachMatch **am_ptr = (struct AttachMatch **) ptr;
69 struct AttachMatch *am = *am_ptr;
70 regfree(&am->minor_regex);
71 FREE(&am->major);
72 FREE(am_ptr);
73}
#define FREE(x)
Free memory and set the pointer to NULL.
Definition memory.h:68
An attachment matching a regex for attachment counter.
Definition commands.c:49
regex_t minor_regex
Minor mime type regex.
Definition commands.c:53
const char * major
Major mime type, e.g. "text".
Definition commands.c:50
Here is the caller graph for this function: