--- a/src/kv_list.c Sun Dec 14 14:15:26 2025 +0100 +++ b/src/kv_list.c Sun Dec 14 14:29:27 2025 +0100 @@ -381,7 +381,8 @@ CxHashKey *key_ptr = cx_kv_list_loc_key(kv_list, node_data); *key_ptr = *map_entry.key; - return map_entry; + // we must return an entry that points to the node data! + return (CxMapEntry ){key_ptr, node_data}; } static void *cx_kvl_iter_current_entry(const void *it) {