[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torsocks/master] Fix: fix NULL dereference on error
commit dcbdeb2093e46e2a74293f03d15d8e202d322a06
Author: David Goulet <dgoulet@xxxxxxxxx>
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@xxxxxxxxx>
---
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits