aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_address.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-23 07:16:51 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-23 07:17:00 -0500
commitb3534dfc5e85c82e915c1576a8a58500fdd7c878 (patch)
tree0f5307dc69f4d7d49e8721c2f6b104f38dc78ea8 /src/test/test_address.c
parentcda238178986e79ff8f783469682f33fa7230a26 (diff)
downloadtor-b3534dfc5e85c82e915c1576a8a58500fdd7c878.tar.gz
tor-b3534dfc5e85c82e915c1576a8a58500fdd7c878.zip
Add missing check to test_address_get_if_addrs_ifaddrs. Bug 18378
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r--src/test/test_address.c4
1 files changed, 3 insertions, 1 deletions
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;
}