* src/util.c (keyvalue_create): Use key and not value for the
allocation.
--
Despite that I have used the pattern of variable length structs for
soooo many times, I got it wrong this time. :-(. It might be useful
to have a dedicated malloc function+macro to help with that. This
could actually do the calloc only for the static part of the struct
and copy the string into the dynamic part.
keyvalue_t kv;
/* Insert a new data item. */
- kv = xtrymalloc (sizeof *kv + strlen (value));
+ kv = xtrymalloc (sizeof *kv + strlen (key));
if (!kv)
return NULL;
kv->next = NULL;