소스 검색

Fix a memory leak in config_get_assigned_option()

This was introducd in 4d83999213712c7 in 0.3.0.3-alpha.  This is bug
21682.
Nick Mathewson 7 년 전
부모
커밋
27058bd8cb
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      changes/bug21682
  2. 1 0
      src/or/confparse.c

+ 3 - 0
changes/bug21682

@@ -0,0 +1,3 @@
+  o Minor bugfixes (memory leaks):
+    - Fix a memory leak when using GETCONF on a port option.
+      Fixes bug 21682; bugfix on 0.3.0.3-alpha.

+ 1 - 0
src/or/confparse.c

@@ -779,6 +779,7 @@ config_get_assigned_option(const config_format_t *fmt, const void *options,
       tor_free(result);
       return NULL;
     case CONFIG_TYPE_LINELIST_S:
+      tor_free(result->key);
       tor_free(result);
       result = config_lines_dup_and_filter(*(const config_line_t **)value,
                                            key);