浏览代码

Initialize fd values in tor_port_check_forwarding to -1

Nick Mathewson 15 年之前
父节点
当前提交
80b515b85f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/util.c

+ 1 - 1
src/common/util.c

@@ -3226,7 +3226,7 @@ tor_check_port_forwarding(const char *filename, int dir_port, int or_port,
   /* Start the child, if it is not already running */
   if (-1 == child_pid &&
       time_to_run_helper < now) {
-    int fd_out, fd_err;
+    int fd_out=-1, fd_err=-1;
 
     /* Assume tor-fw-helper will succeed, start it later*/
     time_to_run_helper = now + TIME_TO_EXEC_FWHELPER_SUCCESS;