From 975b71aa825c5330e1e7c6591eae1888c1ae9962 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 23 Aug 2013 13:28:57 +0200 Subject: pingu_host: fix double free on cleanup fixes #1 --- src/pingu_host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pingu_host.c b/src/pingu_host.c index f7695c4..5887996 100644 --- a/src/pingu_host.c +++ b/src/pingu_host.c @@ -22,7 +22,7 @@ void execute_action(const char *action) { pid_t pid; const char *shell; - + if (action == NULL) return; @@ -127,7 +127,7 @@ int pingu_host_init(struct ev_loop *loop) struct pingu_host *host; list_for_each_entry(host, &host_list, host_list_entry) { if (host->label == NULL) - host->label = host->host; + host->label = strdup(host->host); ev_timer_init(&host->burst_timeout_watcher, pingu_burst_timeout_cb, 1.0, host->burst_interval); ev_timer_start(loop, &host->burst_timeout_watcher); -- cgit v1.2.3