NeoMutt  2023-05-17-56-ga67199
Teaching an old dog new tricks
DOXYGEN
mdata_free()

Free the private data attached to the Menu. More...

+ Collaboration diagram for mdata_free():

Functions

void attach_private_data_free (struct Menu *menu, void **ptr)
 Free Attach Data - Implements Menu::mdata_free() -. More...
 
static void autocrypt_menu_free (struct Menu *menu, void **ptr)
 Free the Autocrypt account Menu - Implements Menu::mdata_free() -. More...
 
void attach_data_free (struct Menu *menu, void **ptr)
 Free the Compose Attach Data - Implements Menu::mdata_free() -. More...
 
static void gpgme_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void pgp_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void smime_key_table_free (struct Menu *menu, void **ptr)
 Free the key table - Implements Menu::mdata_free() -. More...
 
static void free_pattern_menu (struct Menu *menu, void **ptr)
 Free the Pattern Completion menu - Implements Menu::mdata_free() -. More...
 

Detailed Description

Free the private data attached to the Menu.

Parameters
menuMenu
ptrMenu data to free
Precondition
menu is not NULL
ptr is not NULL
*ptr is not NULL

Function Documentation

◆ attach_private_data_free()

void attach_private_data_free ( struct Menu menu,
void **  ptr 
)

Free Attach Data - Implements Menu::mdata_free() -.

Parameters
menuMenu
ptrAttach Data to free

Definition at line 38 of file private_data.c.

39{
40 if (!ptr || !*ptr)
41 return;
42
43 FREE(ptr);
44}
#define FREE(x)
Definition: memory.h:43
+ Here is the caller graph for this function:

◆ autocrypt_menu_free()

static void autocrypt_menu_free ( struct Menu menu,
void **  ptr 
)
static

Free the Autocrypt account Menu - Implements Menu::mdata_free() -.

Definition at line 196 of file dlg_autocrypt.c.

197{
198 struct AccountEntry *entries = *ptr;
199
200 for (size_t i = 0; i < menu->max; i++)
201 {
203 mutt_addr_free(&entries[i].addr);
204 }
205
206 FREE(ptr);
207}
void mutt_addr_free(struct Address **ptr)
Free a single Address.
Definition: address.c:454
void mutt_autocrypt_db_account_free(struct AutocryptAccount **ptr)
Free an AutocryptAccount.
Definition: db.c:244
An entry in the Autocrypt account Menu.
Definition: private.h:44
struct Address * addr
Email address associated with the account.
Definition: private.h:47
struct AutocryptAccount * account
Account details.
Definition: private.h:46
int max
Number of entries in the menu.
Definition: lib.h:72
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attach_data_free()

void attach_data_free ( struct Menu menu,
void **  ptr 
)

Free the Compose Attach Data - Implements Menu::mdata_free() -.

Definition at line 37 of file attach_data.c.

38{
39 struct ComposeAttachData *attach_data = *ptr;
40
41 mutt_actx_free(&attach_data->actx);
42
43 FREE(ptr);
44}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct AttachCtx * actx
Set of attachments.
Definition: attach_data.h:34
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gpgme_key_table_free()

static void gpgme_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 607 of file dlg_gpgme.c.

608{
609 FREE(ptr);
610}
+ Here is the caller graph for this function:

◆ pgp_key_table_free()

static void pgp_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 525 of file dlg_pgp.c.

526{
527 FREE(ptr);
528}
+ Here is the caller graph for this function:

◆ smime_key_table_free()

static void smime_key_table_free ( struct Menu menu,
void **  ptr 
)
static

Free the key table - Implements Menu::mdata_free() -.

Note
The keys are owned by the caller of the dialog

Definition at line 183 of file dlg_smime.c.

184{
185 FREE(ptr);
186}
+ Here is the caller graph for this function:

◆ free_pattern_menu()

static void free_pattern_menu ( struct Menu menu,
void **  ptr 
)
static

Free the Pattern Completion menu - Implements Menu::mdata_free() -.

Definition at line 151 of file dlg_pattern.c.

152{
153 struct PatternEntry *entries = *ptr;
154
155 for (size_t i = 0; i < menu->max; i++)
156 {
157 FREE(&entries[i].tag);
158 FREE(&entries[i].expr);
159 FREE(&entries[i].desc);
160 }
161
162 FREE(ptr);
163}
A line in the Pattern Completion menu.
Definition: private.h:36
const char * desc
Description of pattern.
Definition: private.h:40
const char * tag
Copied to buffer if selected.
Definition: private.h:38
const char * expr
Displayed in the menu.
Definition: private.h:39
+ Here is the caller graph for this function: