aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/router.c
diff options
context:
space:
mode:
authorrl1987 <rl1987@users.noreply.github.com>2020-05-21 14:17:15 +0300
committerrl1987 <rl1987@users.noreply.github.com>2020-05-21 14:17:15 +0300
commita5d28bf88f839c21fbefde8391d777fd9610abd3 (patch)
tree0d136fa3df36dba4cfdd230c0cb1b1d98456a0bd /src/feature/relay/router.c
parentded99992b831bfff782a3b3c612297a4634d3d88 (diff)
downloadtor-a5d28bf88f839c21fbefde8391d777fd9610abd3.tar.gz
tor-a5d28bf88f839c21fbefde8391d777fd9610abd3.zip
Check for NULL from tor_dup_ip()
Diffstat (limited to 'src/feature/relay/router.c')
-rw-r--r--src/feature/relay/router.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 267dee8483..34d8163c36 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -2784,6 +2784,9 @@ router_dump_router_to_string(routerinfo_t *router,
}
address = tor_dup_ip(router->addr);
+ if (!address)
+ goto err;
+
chunks = smartlist_new();
/* Generate the easy portion of the router descriptor. */