From: campbellsean@google.com Date: Wed, 18 Oct 2017 20:48:50 +0000 (-0400) Subject: Minor changes to address PR comments. X-Git-Tag: collectd-5.8.0~35^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=065dbc0d449f7b0e8986635db0f9c481de64789d;p=collectd.git Minor changes to address PR comments. --- diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index 791199ff..4df11bcf 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -86,7 +86,6 @@ static int init_hostname(void) { hostname_len = NI_MAXHOST; } char hostname[hostname_len]; - hostname_set(hostname); str = global_option_get("Hostname"); if ((str != NULL) && (str[0] != 0)) { diff --git a/src/daemon/globals.c b/src/daemon/globals.c index 3d3c7ab2..207ca05d 100644 --- a/src/daemon/globals.c +++ b/src/daemon/globals.c @@ -43,6 +43,6 @@ void hostname_set(char const *hostname) { if (h == NULL) return; - free(hostname_g); + sfree(hostname_g); hostname_g = h; }