From 3f0ccdef3cfd4d03c79bbead6c8b23bad87e3eee Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 23 Sep 2009 07:29:58 +0530 Subject: strdup() the default stathost in config struct as it can be freed --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 608e707..4b0c2c2 100644 --- a/src/main.c +++ b/src/main.c @@ -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) { -- cgit v1.2.3