/*
+ * Copyright notice from original mutt:
* Copyright (C) 1997-2000 Thomas Roessler <roessler@does-not-exist.org>
- *
- * 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. */
#include <unistd.h>
#include <time.h>
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "lib.h"
#include "pgplib.h"
for (sp = *sigp; sp; sp = q) {
q = sp->next;
- FREE (&sp);
+ p_delete(&sp);
}
*sigp = NULL;
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;
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;
}
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)