non-NULL port (e.g. ":80" which is a valid listening address). In that
case, port should be free()d before returning.
Coverity Scan (CID:15)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2379
d4fa192b-c00b-0410-8231-
f00ffab90ce4
* XXX: again: we should check it here in the "trivial" case.
*/
if (VSS_parse(b_arg, &addr, &port) != 0 || addr == NULL) {
+ /*
+ * (addr == NULL && port != NULL) is possible if
+ * the user incorrectly specified an address such
+ * as ":80", which is a valid listening address.
+ * In the future, we may want to interpret this as
+ * a shortcut for "localhost:80".
+ */
+ free(port);
fprintf(stderr, "invalid backend address\n");
return (1);
}