Does StringMapInsert take ownership of both key and value? Then you need to xstrdup("0") here.