소스 검색

Fix leakable rsa key

svn:r3099
Nick Mathewson 21 년 전
부모
커밋
0f49fd3bcd
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/common/tortls.c

+ 2 - 0
src/common/tortls.c

@@ -372,6 +372,8 @@ tor_tls_context_new(crypto_pk_env_t *identity,
     tor_free(global_tls_context);
   }
   global_tls_context = result;
+  if (rsa)
+    crypto_free_pk_env(rsa);
   return 0;
 
  error: