Selaa lähdekoodia

Fix one-time memory leak when initializing libevent. Spotted by Sebastian

Nick Mathewson 15 vuotta sitten
vanhempi
commit
441d90a8f9
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/common/compat_libevent.c

+ 2 - 0
src/common/compat_libevent.c

@@ -187,6 +187,8 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
 #endif
 
     the_event_base = event_base_new_with_config(cfg);
+
+    event_config_free(cfg);
   }
 #else
   the_event_base = event_init();