From: Jelle van der Waa Date: Sun, 1 Oct 2017 16:48:34 +0000 (+0200) Subject: imap: Fix mx.mbox leak in imap_get_parent_path X-Git-Tag: neomutt-20171006~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7652910685428fdbc0e002469f808234128bf50;p=neomutt imap: Fix mx.mbox leak in imap_get_parent_path valgrind reports a memory leak in imap_get_parent_path due to no free'ing mx.mbox. As described in imap_parse_path, the callee should free mx.mbox. --- diff --git a/imap/util.c b/imap/util.c index 2945e8b37..6d6acce3c 100644 --- a/imap/util.c +++ b/imap/util.c @@ -166,6 +166,7 @@ void imap_get_parent_path(char *output, const char *path, size_t olen) /* Returns a fully qualified IMAP url */ imap_qualify_path(output, olen, &mx, mbox); + FREE(&mx.mbox); } /**