From dfb76c58bea9ff166af53e384e349d9d65fc5a37 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Fri, 9 Feb 2018 09:03:12 +0000 Subject: [PATCH] Fix free_opt for regex --- init.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/init.c b/init.c index 7010daac0..cd518c617 100644 --- a/init.c +++ b/init.c @@ -693,21 +693,13 @@ int mutt_extract_token(struct Buffer *dest, struct Buffer *tok, int flags) static void free_opt(struct Option *p) { - struct Regex **pp = NULL; - switch (DTYPE(p->type)) { case DT_ADDRESS: mutt_addr_free((struct Address **) p->var); break; case DT_REGEX: - pp = (struct Regex **) p->var; - FREE(&(*pp)->pattern); - if ((*pp)->regex) - { - regfree((*pp)->regex); - FREE(&(*pp)->regex); - } + mutt_regex_free((struct Regex **) p->var); break; case DT_PATH: case DT_STRING: -- 2.40.0