When called from C, these are always static. But there is no
such guarantee when called from elsewhere.
We really should refcount the 'comm' too or something like that.
For now, they are never freed.
Signed-off-by: NeilBrown <neil@brown.name>
(map->size - pos) * sizeof(map->keys[0]));
memmove(map->comms+pos+ins_cnt, map->comms+pos,
(map->size - pos) * sizeof(struct command *));
- map->keys[pos] = k;
+ map->keys[pos] = strdup(k);
map->comms[pos] = comm;
if (comm2) {
map->keys[pos+1] = k;