fix(identity): free TO name on glob success path; harden test oracle

This commit is contained in:
2026-09-22 17:08:03 +02:00
parent 309c9aed98
commit ff4db23831
2 changed files with 85 additions and 7 deletions
+5
View File
@@ -654,6 +654,11 @@ int identity_parse_map(Config* config, const char* value, bool is_group) {
free(list);
return -1;
}
/* Every rule emitted by the expansion took its own str_dup of the name,
* so the parse-time copy is unreachable on success: release it here (the
* failure path above already does). `parsed.to_name` is NULL for a
* numeric TO. */
free(parsed.to_name);
continue;
}
if (identity_parse_from(from_token, is_group, &parsed.from, &parsed.from_hi) != 0) {