From a5d28bf88f839c21fbefde8391d777fd9610abd3 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Thu, 21 May 2020 14:17:15 +0300 Subject: Check for NULL from tor_dup_ip() --- src/feature/control/control_getinfo.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/feature/control') diff --git a/src/feature/control/control_getinfo.c b/src/feature/control/control_getinfo.c index 685deb8ecc..3605c23dcd 100644 --- a/src/feature/control/control_getinfo.c +++ b/src/feature/control/control_getinfo.c @@ -137,6 +137,7 @@ getinfo_helper_misc(control_connection_t *conn, const char *question, return -1; } *answer = tor_dup_ip(addr); + tor_assert_nonfatal(*answer); } else if (!strcmp(question, "traffic/read")) { tor_asprintf(answer, "%"PRIu64, (get_bytes_read())); } else if (!strcmp(question, "traffic/written")) { -- cgit v1.2.3-54-g00ecf