From bbc6aa9dac43179eadb051366c76a12650333205 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 19 Oct 2020 10:51:26 -0400 Subject: [PATCH] TT#14008 avoid double free on shutdown Change-Id: I30ca16313ee8039b51797b60955265fb4a7545a1 --- daemon/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/main.c b/daemon/main.c index ec9c87d54..aae07865f 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1073,7 +1073,8 @@ int main(int argc, char **argv) { control_ng_cleanup(); redis_close(rtpe_redis); - redis_close(rtpe_redis_write); + if (rtpe_redis_write != rtpe_redis) + redis_close(rtpe_redis_write); redis_close(rtpe_redis_notify); free_prefix();