diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-03-04 18:42:27 +0100 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-03-04 18:42:27 +0100 |
commit | 9f98e6535ac58afa0cc56a4a5d9164fedead4b3c (patch) | |
tree | b370d8cce00dfccf916c43303c7b0a410c801ab1 /src/common/address.c | |
parent | 2627299ef053ed40a73cb40e954e6b611d7e450b (diff) | |
download | tor-9f98e6535ac58afa0cc56a4a5d9164fedead4b3c.tar.gz tor-9f98e6535ac58afa0cc56a4a5d9164fedead4b3c.zip |
Correctly duplicate addresses in get_interface_address6_list
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/address.c b/src/common/address.c index c77b0f3c94..793a40effc 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -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))); } } } |