diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-23 13:28:57 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-23 13:28:57 +0200 |
commit | 975b71aa825c5330e1e7c6591eae1888c1ae9962 (patch) | |
tree | f5b62243430f25dd6c6d9fec0d500bd2b60d6957 | |
parent | 3bf88a0f1d34ee84e7c0c54034a4e2c2ccfc9bd8 (diff) | |
download | pingu-975b71aa825c5330e1e7c6591eae1888c1ae9962.tar.bz2 pingu-975b71aa825c5330e1e7c6591eae1888c1ae9962.tar.xz |
pingu_host: fix double free on cleanup
fixes #1
-rw-r--r-- | src/pingu_host.c | 4 |
1 files 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); |