Explorar o código

Add missing check to test_address_get_if_addrs_ifaddrs. Bug 18378

Nick Mathewson %!s(int64=9) %!d(string=hai) anos
pai
achega
b3534dfc5e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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;
 }