#include <common/compat/poll.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/utils.h>
+#include <common/compat/getenv.h>
#include "lttng-relayd.h"
#include "health-relayd.h"
{
const char *health_path;
- health_path = getenv(LTTNG_RELAYD_HEALTH_ENV);
+ health_path = lttng_secure_getenv(LTTNG_RELAYD_HEALTH_ENV);
if (health_path) {
strncpy(health_unix_sock_path, health_path,
PATH_MAX);
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) {
end:
free(rundir);
+ free(relayd_path);
return ret;
}