aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pinger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pinger.c b/src/pinger.c
index 65e8e6a..824bac1 100644
--- a/src/pinger.c
+++ b/src/pinger.c
@@ -982,6 +982,7 @@ hostping_from_seqno(int seq)
host = seqidx[seq].host;
if (host) {
int n;
+ HOSTPING *orig = host;
hostping_lock(host);
n = seqidx[seq].ping_num;
@@ -1001,6 +1002,8 @@ hostping_from_seqno(int seq)
host->name, n, seq);
host = NULL;
}
+ if (!host)
+ hostping_unlock(orig);
} else
fatal("no host found for sequence number %d", seq);
pthread_mutex_unlock(&seqno_mutex);

Return to:

Send suggestions and report system problems to the System administrator.