From c7904866b00b5c3510d7b5cc18e545835d15ced0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 24 Aug 2020 12:24:24 -0400 Subject: [PATCH] fix mem handling for Redis auth strings Change-Id: I03e3368fe569716d3309cf012ba39bdb2cbe0b35 --- daemon/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index 9dd84dcfd..6ac007bfa 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -320,11 +320,11 @@ static int redis_ep_parse(endpoint_t *ep, int *db, char **auth, const char *auth sl = strchr(str, '@'); if (sl) { *sl = 0; - *auth = str; + *auth = g_strdup(str); str = sl+1; } else if ((sl = getenv(auth_env))) - *auth = sl; + *auth = g_strdup(sl); sl = strchr(str, '/'); if (!sl)