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

[tor-commits] [tor/master] Fix a NULL pointer dereference in parse_server_transport_line().



commit 9d53c0091169e9b68d91c023124e1fed31909ffa
Author: George Kadianakis <desnacked@xxxxxxxxx>
Date:   Wed Oct 26 17:13:56 2011 +0200

    Fix a NULL pointer dereference in parse_server_transport_line().
---
 src/or/config.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index ec9d84b..3080da0 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4985,8 +4985,10 @@ parse_server_transport_line(const char *line, int validate_only)
  done:
   SMARTLIST_FOREACH(items, char*, s, tor_free(s));
   smartlist_free(items);
-  SMARTLIST_FOREACH(transport_list, char*, s, tor_free(s));
-  smartlist_free(transport_list);
+  if (transport_list) {
+    SMARTLIST_FOREACH(transport_list, char*, s, tor_free(s));
+    smartlist_free(transport_list);
+  }
 
   return r;
 }

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