PR_Free(host);
PR_FREEIF(host);
net_check_for_company_hostname(ActiveEntry *ce){    HTTPConData * cd = (HTTPConData *)ce->con_data;    Bool add_www = FALSE;    Bool add_com = FALSE;    Bool goBrowsing = FALSE;       if (PREF_GetBoolPref("browser.goBrowsing.enabled", &goBrowsing) != PREF_OK) goBrowsing = 0;    if(!cd->orig_host) {        char *dot=NULL;          /* if the hostname doesn't have any        * dots in it, then assume it's of        * the form "netscape" or "ford".        * If we add www. and .com to the front        * and end we will get www.netscape.com :)        */        char * host = NET_ParseURL(ce->URL_s->address, GET_HOST_PART);          if(host && *host && !(dot = PL_strchr(host, '.'))) {            add_www = add_com = TRUE;        } else if(dot && !PL_strchr(dot+1, '.')) {            /* there is only one dot in the host name             * so it's probably of the form of "netscape.com"             * or "ukans.edu".   Add a "www." on the front             * and try again.             */            add_www = TRUE;        }        PR_Free(host);        host = NULL;        if(add_www) {            /* no dots in hostname */            if (goBrowsing && !PL_strchr(ce->URL_s->address, '/')) {                     char *pUrl;                PREF_CopyCharPref("network.search.url",&pUrl);                if (pUrl) {                    char *tmp = NET_ParseURL(ce->URL_s->address, GET_HOST_PART);                    char* new_address = PR_smprintf("%sgo+%s", pUrl, tmp);                    PR_Free(pUrl);                    PR_Free(ce->URL_s->address);                    PR_FREEIF(tmp);                      ce->URL_s->address = new_address;                      if(cd->connection->sock != NULL)                        NET_TotalNumberOfOpenConnections--;                    return (0);                } else {                    return (-1);                }            } else {                char *new_address = NET_ParseURL(ce->URL_s->address,                           GET_PROTOCOL_PART);                char *tmp = NET_ParseURL(ce->URL_s->address, GET_HOST_PART);                /* save the host for error messages */                cd->orig_host = tmp;                StrAllocCat(new_address, "//www.");                StrAllocCat(new_address, tmp);                if(add_com)                    StrAllocCat(new_address, ".com");                tmp = NET_ParseURL(ce->URL_s->address,                         GET_PATH_PART | GET_SEARCH_PART | GET_HASH_PART);                          StrAllocCat(new_address, tmp);                PR_FREEIF(tmp);                PR_Free(ce->URL_s->address);                ce->URL_s->address = new_address;                if(cd->connection->sock != NULL)                    NET_TotalNumberOfOpenConnections--;                return(0);  /* will repeat this step */            }        }       } else {        /* the host mapping trick has already been applied and failed         * redo the error message and fail         */        ce->URL_s->error_msg = NET_ExplainErrorDetails(                        MK_UNABLE_TO_LOCATE_HOST,                         cd->orig_host);        /* fall through for failure case */    }  return(-1);}