From ce4045d92e03f41dd5737d2716d27a198c0be926 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 13 May 2019 12:13:22 +0000 Subject: [PATCH] Tidy Address free'ing functions --- address/address.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/address/address.c b/address/address.c index cb0215fcb..4ad938919 100644 --- a/address/address.c +++ b/address/address.c @@ -381,7 +381,7 @@ static void add_addrspec(struct AddressList *al, const char *phrase, if (!parse_addr_spec(phrase, comment, commentlen, commentmax, cur)) { - mutt_addr_free(&cur); + free_address(&cur); return; } @@ -441,11 +441,7 @@ void mutt_addr_free(struct Address **p) return; struct AddressList *al = mutt_addr_to_addresslist(*p); - struct AddressNode *an, *tmp; - TAILQ_FOREACH_SAFE(an, al, entries, tmp) - { - mutt_addresslist_free_one(al, an); - } + mutt_addresslist_free(&al); } /** @@ -581,7 +577,7 @@ struct Address *mutt_addr_parse_list(struct Address *top, const char *s) if (!s) { mutt_addresslist_free(&al); - mutt_addr_free(&a); + free_address(&a); return NULL; } mutt_addresslist_append(al, a); -- 2.40.0