From: Nick Porter Date: Fri, 15 Dec 2023 21:11:54 +0000 (+0000) Subject: Only create map when update section exists X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fd38fd136b087fb0ca6fcbb9d6037768d775ebe;p=thirdparty%2Ffreeradius-server.git Only create map when update section exists --- diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index 66e889a79bc..44a4b25a3ec 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -2310,7 +2310,8 @@ static int ldap_update_section_parse(TALLOC_CTX *ctx, call_env_parsed_head_t *ou MEM(maps = talloc(parsed, map_list_t)); map_list_init(maps); - if (map_afrom_cs(maps, maps, update, t_rules, t_rules, fr_ldap_map_verify, NULL, LDAP_MAX_ATTRMAP) < 0) { + if (update && (map_afrom_cs(maps, maps, update, t_rules, t_rules, fr_ldap_map_verify, + NULL, LDAP_MAX_ATTRMAP)) < 0) { call_env_parsed_free(out, parsed); return -1; }