From: Phil Carmody Date: Tue, 16 Sep 2014 17:29:04 +0000 (+0300) Subject: lib: hash-format - fix leak on _init() failure path X-Git-Tag: 2.2.14.rc1~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c971768955f826fb965d8ffbb13dac93c9bbead8;p=thirdparty%2Fdovecot%2Fcore.git lib: hash-format - fix leak on _init() failure path If any of the analysis/parse helpers return failure, then the whole pool will leak. Signed-off-by: Phil Carmody --- diff --git a/src/lib/hash-format.c b/src/lib/hash-format.c index 9abc02205f..9ad477c1df 100644 --- a/src/lib/hash-format.c +++ b/src/lib/hash-format.c @@ -134,6 +134,7 @@ int hash_format_init(const char *format_string, struct hash_format **format_r, } T_END; if (ret < 0) { *error_r = t_strdup(*error_r); + pool_unref(&pool); return -1; } *format_r = format;