]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a NULL pointer dereference in parse_server_transport_line().
authorGeorge Kadianakis <desnacked@gmail.com>
Wed, 26 Oct 2011 15:13:56 +0000 (17:13 +0200)
committerNick Mathewson <nickm@torproject.org>
Wed, 26 Oct 2011 15:21:11 +0000 (11:21 -0400)
src/or/config.c

index ec9d84b374915e0712a579fe5bab7deb23495d92..3080da0485f5caf78443c6711bf0531a58abb927 100644 (file)
@@ -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;
 }