All the other free functions are called *_free().
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
FREE(&alias_table);
}
mutt_menu_pop_current(*menu);
FREE(&(*menu)->help);
- mutt_menu_destroy(menu);
+ mutt_menu_free(menu);
}
/**
if (menu)
{
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
}
if (goto_swapper[0] != '\0')
#endif
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
if (actx->idxlen)
e->content = actx->idx[0]->content;
mutt_buffer_pool_release(&drow);
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
mutt_debug(LL_DEBUG2, "done=%d\n", done);
return done == 2;
}
mutt_buffer_pool_release(&drow);
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
gnutls_x509_crt_deinit(cert);
return done == 2;
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
return close;
}
}
/**
- * mutt_menu_destroy - Destroy a menu
+ * mutt_menu_free - Destroy a menu
* @param[out] p Menu to destroy
*/
-void mutt_menu_destroy(struct Menu **p)
+void mutt_menu_free(struct Menu **ptr)
{
- if ((*p)->dialog)
+ if (!ptr || !*ptr)
+ return;
+
+ struct Menu *m = *ptr;
+ if (m->dialog)
{
- for (int i = 0; i < (*p)->max; i++)
- FREE(&(*p)->dialog[i]);
+ for (int i = 0; i < m->max; i++)
+ FREE(&m->dialog[i]);
- FREE(&(*p)->dialog);
+ FREE(&m->dialog);
}
- FREE(p);
+ FREE(ptr);
}
/**
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
}
/**
void menu_top_page(struct Menu *menu);
void mutt_menu_add_dialog_row(struct Menu *menu, const char *row);
void mutt_menu_current_redraw(void);
-void mutt_menu_destroy(struct Menu **p);
+void mutt_menu_free(struct Menu **ptr);
void mutt_menu_init(void);
int mutt_menu_loop(struct Menu *menu);
struct Menu *mutt_menu_new(enum MenuType type);
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
FREE(&key_table);
return k;
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
FREE(&key_table);
return kp;
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
FREE(&table);
return selected_key;
if (old_PagerIndexLines != C_PagerIndexLines)
{
if (rd.index)
- mutt_menu_destroy(&rd.index);
+ mutt_menu_free(&rd.index);
rd.index = NULL;
}
}
FREE(&rd.line_info);
mutt_menu_pop_current(pager_menu);
- mutt_menu_destroy(&pager_menu);
+ mutt_menu_free(&pager_menu);
if (rd.index)
- mutt_menu_destroy(&rd.index);
+ mutt_menu_free(&rd.index);
mutt_buffer_free(&helpstr);
mutt_window_free(&rd.index_status_window);
C_Sort = orig_sort;
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
return (r > -1) ? ctx->mailbox->emails[r] : NULL;
}
menu->current = 0;
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
menu = mutt_menu_new(MENU_QUERY);
menu->menu_make_entry = query_make_entry;
menu->menu_search = query_search;
free_query(&results);
FREE(&query_table);
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
}
}
mutt_actx_free(&actx);
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
return;
}
}
mutt_menu_pop_current(menu);
- mutt_menu_destroy(&menu);
+ mutt_menu_free(&menu);
/* construct the remailer list */