X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpkey.c;h=1136ee5714c1bf02d6aff33791b7deefd1a57143;hp=640f080b72e03196d69ba2927a6d082ccba0814e;hb=8e037c67a88cb4680c4391134c578e3b55a80f8a;hpb=bbc4fd52516a8afefbd14c77e34f8389d6f0a6ed diff --git a/pgpkey.c b/pgpkey.c index 640f080..1136ee5 100644 --- a/pgpkey.c +++ b/pgpkey.c @@ -12,6 +12,8 @@ # include "config.h" #endif +#include + #include "mutt.h" #include "enter.h" #include "ascii.h" @@ -581,7 +583,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, ADDRESS * p, const char *s) if (option (OPTPGPCHECKTRUST) && (!pgp_id_is_valid (KeyTable[menu->current]) || !pgp_id_is_strong (KeyTable[menu->current]))) { - char *s = ""; + const char *s = ""; char buff[LONG_STRING]; if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE) @@ -625,7 +627,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, ADDRESS * p, const char *s) } mutt_menuDestroy (&menu); - mem_free (&KeyTable); + p_delete(&KeyTable); set_option (OPTNEEDREDRAW); @@ -661,7 +663,7 @@ pgp_key_t pgp_ask_for_key (char *tag, char *whatfor, if (l) str_replace (&l->dflt, resp); else { - l = mem_malloc (sizeof (struct pgp_cache)); + l = p_new(struct pgp_cache, 1); l->next = id_defaults; id_defaults = l; l->what = str_dup (whatfor); @@ -770,7 +772,7 @@ static LIST *pgp_add_string_to_hints (LIST * hints, const char *str) hints = mutt_add_list (hints, t); } - mem_free (&scratch); + p_delete(&scratch); return hints; }