X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgplib.c;h=d9e5ff9f53aae23aa9a5d34ae012cd7a6c9103a9;hp=eda1855af043b26c179b98376ea6af8989e8b58d;hb=4670d23c56f21afaa7ef2e0289a47a6a0d112671;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/pgplib.c b/pgplib.c index eda1855..d9e5ff9 100644 --- a/pgplib.c +++ b/pgplib.c @@ -1,22 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1997-2000 Thomas Roessler - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ /* Generally useful, pgp-related functions. */ @@ -31,6 +19,8 @@ #include #include +#include + #include "mutt.h" #include "lib.h" #include "pgplib.h" @@ -126,7 +116,7 @@ void pgp_free_sig (pgp_sig_t ** sigp) for (sp = *sigp; sp; sp = q) { q = sp->next; - FREE (&sp); + p_delete(&sp); } *sigp = NULL; @@ -141,8 +131,8 @@ void pgp_free_uid (pgp_uid_t ** upp) for (up = *upp; up; up = q) { q = up->next; pgp_free_sig (&up->sigs); - FREE (&up->addr); - FREE (&up); + p_delete(&up->addr); + p_delete(&up); } *upp = NULL; @@ -154,10 +144,10 @@ pgp_uid_t *pgp_copy_uids (pgp_uid_t * up, pgp_key_t parent) pgp_uid_t **lp = &l; for (; up; up = up->next) { - *lp = safe_calloc (1, sizeof (pgp_uid_t)); + *lp = p_new(pgp_uid_t, 1); (*lp)->trust = up->trust; (*lp)->flags = up->flags; - (*lp)->addr = safe_strdup (up->addr); + (*lp)->addr = m_strdup(up->addr); (*lp)->parent = parent; lp = &(*lp)->next; } @@ -175,8 +165,8 @@ static void _pgp_free_key (pgp_key_t * kpp) kp = *kpp; pgp_free_uid (&kp->address); - FREE (&kp->keyid); - FREE (kpp); + p_delete(&kp->keyid); + p_delete(kpp); } pgp_key_t pgp_remove_key (pgp_key_t * klist, pgp_key_t key)