From b3534dfc5e85c82e915c1576a8a58500fdd7c878 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 23 Feb 2016 07:16:51 -0500 Subject: [PATCH] Add missing check to test_address_get_if_addrs_ifaddrs. Bug 18378 --- src/test/test_address.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/test_address.c b/src/test/test_address.c index 3b17b23571..748dfc5a68 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -297,7 +297,9 @@ test_address_get_if_addrs_ifaddrs(void *arg) } done: - SMARTLIST_FOREACH(results, tor_addr_t *, t, tor_free(t)); + if (results) { + SMARTLIST_FOREACH(results, tor_addr_t *, t, tor_free(t)); + } smartlist_free(results); return; }