Kaynağa Gözat

prevent assert failure on -HUP when options->PidFile==NULL

svn:r885
Roger Dingledine 22 yıl önce
ebeveyn
işleme
727a260a81
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      src/or/config.c

+ 2 - 1
src/or/config.c

@@ -292,7 +292,8 @@ int getconfig(int argc, char **argv, or_options_t *options) {
     argc = backup_argc;
 
     /* record some previous values, so we can fail if they change */
-    previous_pidfile = tor_strdup(options->PidFile);
+    if(options->PidFile)
+      previous_pidfile = tor_strdup(options->PidFile);
     previous_runasdaemon = options->RunAsDaemon;
     free_options(options);
   }