strdup() the default stathost in config struct as it can be freed

This commit is contained in:
Mukund Sivaraman 2009-09-23 07:29:58 +05:30
parent 0ecb688269
commit 3f0ccdef3c

View File

@ -351,7 +351,7 @@ main (int argc, char **argv)
if (!config.stathost) {
log_message (LOG_INFO, "Setting stathost to \"%s\".",
TINYPROXY_STATHOST);
config.stathost = TINYPROXY_STATHOST;
config.stathost = strdup (TINYPROXY_STATHOST);
}
if (!config.user) {