Fix a memory leak on getaddrinfo in sandbox. Found by coverity

This commit is contained in:
Nick Mathewson 2013-09-16 22:38:02 -04:00
parent 4ea9fbcdb1
commit 1825674bd3

View File

@ -1184,6 +1184,7 @@ sandbox_add_addrinfo(const char* name)
if (ret) { if (ret) {
log_err(LD_BUG,"(Sandbox) failed to getaddrinfo"); log_err(LD_BUG,"(Sandbox) failed to getaddrinfo");
ret = -2; ret = -2;
tor_free(el);
goto out; goto out;
} }