One way to avoid that would be to have a
```
char mutable[] = "www.cfengine.com";
const char fixed[] = "www.cfengine.com";
```
then use the mutable one to pass to ParseHostPort and the fixed one for comparisons.  If ParseHostPort doesn't leave the string as it found it, once done with parsing, you might need to strcpy(mutable, fixed); between tests.
Of course, it'd be a bit tedious to be doing that for each of the strings in use, so it may be simpler to just ignore the leakage.