commit dcbdeb2093e46e2a74293f03d15d8e202d322a06 Author: David Goulet dgoulet@ev0ke.net Date: Thu Apr 3 17:40:23 2014 -0400
Fix: fix NULL dereference on error
Fixes coverity issue 1195182.
Signed-off-by: David Goulet dgoulet@ev0ke.net --- src/lib/torsocks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/torsocks.c b/src/lib/torsocks.c index af4ab79..5734af1 100644 --- a/src/lib/torsocks.c +++ b/src/lib/torsocks.c @@ -192,7 +192,7 @@ static void init_libc_symbols(void) libc_ptr = dlopen(LIBC_NAME, RTLD_LAZY); if (!libc_ptr) { ERR("Unable to dlopen() library " LIBC_NAME "(%s)", dlerror()); - goto error; + goto error_dlopen; }
dlerror(); @@ -217,6 +217,7 @@ error: if (ret != 0) { ERR("dlclose: %s", dlerror()); } +error_dlopen: clean_exit(EXIT_FAILURE); }
tor-commits@lists.torproject.org