Skip to content

Commit

Permalink
fix uninitalized returned list of KV flags
Browse files Browse the repository at this point in the history
closes #3100

(cherry picked from commit 1668bc3)
  • Loading branch information
bogdan-iancu committed May 23, 2023
1 parent 69f5f82 commit e6dd878
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,12 @@ int fixup_named_flags(void** param, str *flag_names, str *kv_flag_names,
return -1;
}

if (kv_flag_names)
for (i = 0; kv_flag_names[i].s ; i++) {
kv_flag_vals[i].s = NULL;
kv_flag_vals[i].len = 0;
}

for (rec = list; rec; rec = rec->next) {
if (flag_names) {
for (i = 0; flag_names[i].s && !str_match(&rec->s, &flag_names[i]);
Expand Down

0 comments on commit e6dd878

Please sign in to comment.