From: Timo Sirainen Date: Fri, 20 Oct 2023 09:21:25 +0000 (+0300) Subject: lib-dict: Avoid passing uninitialized pointer as function parameter X-Git-Tag: 2.4.0~2486 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eba12b8f4bc7b90ffbba144f2aef1a4cb37176f0;p=thirdparty%2Fdovecot%2Fcore.git lib-dict: Avoid passing uninitialized pointer as function parameter It wasn't actually dereferencing the pointer, but it seems this was still causing valgrind to sometimes log an error. --- diff --git a/src/lib-dict/dict.c b/src/lib-dict/dict.c index d327781344..fba9a4b6d3 100644 --- a/src/lib-dict/dict.c +++ b/src/lib-dict/dict.c @@ -383,6 +383,8 @@ int dict_lookup_values(struct dict *dict, const struct dict_op_settings *set, int ret; i_assert(dict_key_prefix_is_valid(key, set->username)); + *error_r = NULL; + e_debug(event, "Looking up '%s'", key); event_add_str(event, "key", key); ret = dict->v.lookup(dict, set, pool, key, values_r, error_r);