Browse Source

Add missing check to test_address_get_if_addrs_ifaddrs. Bug 18378

Nick Mathewson 8 years ago
parent
commit
b3534dfc5e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/test/test_address.c

+ 3 - 1
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;
 }