aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-03-04 18:41:49 +0100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-03-04 18:41:49 +0100
commit2627299ef053ed40a73cb40e954e6b611d7e450b (patch)
treec80904d66423dfd41dceffdf9892f61c39856d22 /src/common/address.c
parent9fc472e1a8a53a18dfbd5c9cde2f1c268c335e96 (diff)
downloadtor-2627299ef053ed40a73cb40e954e6b611d7e450b.tar.gz
tor-2627299ef053ed40a73cb40e954e6b611d7e450b.zip
Avoid freeing an uninitialised pointer in get_interface_addresses_ioctl
Diffstat (limited to 'src/common/address.c')
-rw-r--r--src/common/address.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 8f1ce9dab7..c77b0f3c94 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;