浏览代码

Fix crash in first-time option validation. Oops.

svn:r7018
Nick Mathewson 19 年之前
父节点
当前提交
02d42d9138
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/or/config.c

+ 2 - 2
src/or/config.c

@@ -2075,10 +2075,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
     const char *tp = is_socks ? "SOCKS proxy" : "transparent proxy";
     if (is_socks) {
       opt = options->SocksListenAddress;
-      old = old_options->SocksListenAddress;
+      old = old_options ? old_options->SocksListenAddress : NULL;
     } else {
       opt = options->TransListenAddress;
-      old = old_options->TransListenAddress;
+      old = old_options ? old_options->TransListenAddress : NULL;
     }
 
     for (line = opt; line; line = line->next) {