소스 검색

Convince coverity that we do not have a particular memory leak

Nick Mathewson 8 년 전
부모
커밋
a444b11323
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/or/routerkeys.c

+ 1 - 0
src/or/routerkeys.c

@@ -313,6 +313,7 @@ ed_key_init_from_file(const char *fname, uint32_t flags,
     if (r > 0) {
       have_secret = 1;
       have_encrypted_secret_file = 1;
+      tor_free(got_tag); /* convince coverity we aren't leaking */
       got_tag = tor_strdup(tag);
       loaded_secret_fname = encrypted_secret_fname;
     } else if (errno != ENOENT && norepair) {