fixing a mem leak. Never free what you insert in a StringMap unless you xstrdup it.

I totally misunderstood the way the API work.
Should be ported to the 3.5 branch.