From b7652910685428fdbc0e002469f808234128bf50 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sun, 1 Oct 2017 18:48:34 +0200 Subject: [PATCH] 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. --- imap/util.c | 1 + 1 file changed, 1 insertion(+) 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); } /** -- 2.40.0