X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fhealth-relayd.c;h=1feaaeb374220f30ba1a9fb23ea4d848863817f7;hb=fcf4d551b695cfdb6fe26d21f0509d08ef89b312;hp=8194c3e4bfba9525c878116da96f2928bec2bc9c;hpb=aaa4618487f38c5cf69a63c6bcf3430b62cb9720;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/health-relayd.c b/src/bin/lttng-relayd/health-relayd.c index 8194c3e4b..1feaaeb37 100644 --- a/src/bin/lttng-relayd/health-relayd.c +++ b/src/bin/lttng-relayd/health-relayd.c @@ -149,7 +149,7 @@ static int setup_health_path(void) { int is_root, ret = 0; - char *home_path = NULL, *rundir = NULL, *relayd_path; + char *home_path = NULL, *rundir = NULL, *relayd_path = NULL; ret = parse_health_env(); if (ret) { @@ -221,6 +221,7 @@ int setup_health_path(void) end: free(rundir); + free(relayd_path); return ret; } @@ -329,6 +330,11 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); + if (!revents) { + /* No activity for this FD (poll implementation). */ + continue; + } + /* Thread quit pipe has been closed. Killing thread. */ ret = check_health_quit_pipe(pollfd, revents); if (ret) {