[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] added contingency message to test for sandbox_getaddrinfo



commit fe6e2733ab1e75e0b56741fa06094b257b3695b8
Author: Cristian Toader <cristian.matei.toader@xxxxxxxxx>
Date:   Mon Sep 2 12:16:02 2013 +0300

    added contingency message to test for sandbox_getaddrinfo
---
 src/common/sandbox.c |    3 ++-
 src/or/main.c        |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index a491912..84d2183 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -930,6 +930,7 @@ sandbox_getaddrinfo(const char *name, struct addrinfo **res)
     }
   }
 
+  log_err(LD_BUG,"(Sandbox) failed to get address %s!", name);
   return -1;
 }
 
@@ -958,7 +959,7 @@ sandbox_add_addrinfo(const char* name)
     goto out;
   }
 
-  el->name = strdup(name);
+  el->name = tor_strdup(name);
   el->next = sb_addr_info;
   sb_addr_info = el;
 
diff --git a/src/or/main.c b/src/or/main.c
index af05f0b..5ab4936 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2640,7 +2640,8 @@ find_flashcard_path(PWCHAR path, size_t size)
 #endif
 
 static void
-init_addrinfo(void) {
+init_addrinfo(void)
+{
   char hname[256];
 
   // host name to sandbox



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits