Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes: >> + memcpy(&matched->kvi, kvi, sizeof(struct key_value_info)); > > Can this just be > > matched->kvi = *kvi; > > ? If I remember correctly (big if), we have to copy the memory because the config machinery allocates kvi on the stack, and the relevant functions have returned by then. Hm, does this suggest that kvi should be const? > If not, for the sizeof, use *kvi as the argument instead of struct > key_value_info. Makes sense.