diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-03-11 10:22:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-03-11 10:22:41 -0500 |
commit | 656e23171d64885c1bea95403768386ee369e949 (patch) | |
tree | cc9560bbb54ffbced5b7bbef9e4fda39884efa31 /src | |
parent | 36ac47bd85b1c2c7077b7b008362f6b8da42e237 (diff) | |
parent | 9f98e6535ac58afa0cc56a4a5d9164fedead4b3c (diff) | |
download | tor-656e23171d64885c1bea95403768386ee369e949.tar.gz tor-656e23171d64885c1bea95403768386ee369e949.zip |
Merge remote-tracking branch 'teor/bug18454'
Diffstat (limited to 'src')
-rw-r--r-- | src/common/address.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/address.c b/src/common/address.c index 8f1ce9dab7..793a40effc 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1525,6 +1525,7 @@ get_interface_addresses_ioctl(int severity, sa_family_t family) { /* Some older unixy systems make us use ioctl(SIOCGIFCONF) */ struct ifconf ifc; + ifc.ifc_buf = NULL; int fd; smartlist_t *result = NULL; @@ -1547,7 +1548,6 @@ get_interface_addresses_ioctl(int severity, sa_family_t family) } int mult = 1; - ifc.ifc_buf = NULL; do { mult *= 2; ifc.ifc_len = mult * IFREQ_SIZE; @@ -1790,7 +1790,7 @@ MOCK_IMPL(smartlist_t *,get_interface_address6_list,(int severity, if (get_interface_address6_via_udp_socket_hack(severity,AF_INET, &addr) == 0) { if (include_internal || !tor_addr_is_internal(&addr, 0)) { - smartlist_add(addrs, tor_dup_addr(&addr)); + smartlist_add(addrs, tor_memdup(&addr, sizeof(addr))); } } } @@ -1799,7 +1799,7 @@ MOCK_IMPL(smartlist_t *,get_interface_address6_list,(int severity, if (get_interface_address6_via_udp_socket_hack(severity,AF_INET6, &addr) == 0) { if (include_internal || !tor_addr_is_internal(&addr, 0)) { - smartlist_add(addrs, tor_dup_addr(&addr)); + smartlist_add(addrs, tor_memdup(&addr, sizeof(addr))); } } } |