Skip to content

Commit 1668bc3

Browse files
committed
fix uninitalized returned list of KV flags
closes #3100
1 parent 8264616 commit 1668bc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mod_fix.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ int fixup_named_flags(void** param, str *flag_names, str *kv_flag_names,
551551
return -1;
552552
}
553553

554+
if (kv_flag_names)
555+
for (i = 0; kv_flag_names[i].s ; i++) {
556+
kv_flag_vals[i].s = NULL;
557+
kv_flag_vals[i].len = 0;
558+
}
559+
554560
for (rec = list; rec; rec = rec->next) {
555561
if (flag_names) {
556562
for (i = 0; flag_names[i].s && !str_match(&rec->s, &flag_names[i]);

0 commit comments

Comments
 (0)