diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-12-30 12:35:01 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-30 12:35:01 -0500 |
commit | 6e689aed756fb3d96fa70e9138aedc93be8f35de (patch) | |
tree | 4494619538bc0075a62a03da535c0da390169742 /src/common/sandbox.c | |
parent | b3b840443ddbf126c5a9c25533986e9b9ea33585 (diff) | |
download | tor-6e689aed756fb3d96fa70e9138aedc93be8f35de.tar.gz tor-6e689aed756fb3d96fa70e9138aedc93be8f35de.zip |
Fix a memory leak in tor-resolve
Resolves bug 14050
Diffstat (limited to 'src/common/sandbox.c')
-rw-r--r-- | src/common/sandbox.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c index b1c2a09f14..a06d38608f 100644 --- a/src/common/sandbox.c +++ b/src/common/sandbox.c @@ -1335,6 +1335,13 @@ sandbox_disable_getaddrinfo_cache(void) sandbox_getaddrinfo_cache_disabled = 1; } +void +sandbox_freeaddrinfo(struct addrinfo *ai) +{ + if (sandbox_getaddrinfo_cache_disabled) + freeaddrinfo(ai); +} + int sandbox_getaddrinfo(const char *name, const char *servname, const struct addrinfo *hints, |