From 065dbc0d449f7b0e8986635db0f9c481de64789d Mon Sep 17 00:00:00 2001 From: "campbellsean@google.com" Date: Wed, 18 Oct 2017 16:48:50 -0400 Subject: [PATCH] Minor changes to address PR comments. --- src/daemon/collectd.c | 1 - src/daemon/globals.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.11.0