zsys: don't leak string when realloc fails

We are not interested in realloc since the string is rewritten
in full anyway.  Switch to a more explicit free/malloc style.
Merge pull request #535 from fichtner/realloc_leak

zsys: don't leak string when realloc fails