소스 검색

Merge remote branch 'origin/maint-0.2.2'

Nick Mathewson 15 년 전
부모
커밋
ccec0a1bd3
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      src/common/crypto.c
  2. 1 1
      src/or/router.c

+ 1 - 0
src/common/crypto.c

@@ -405,6 +405,7 @@ crypto_free_pk_env(crypto_pk_env_t *env)
 
   if (--env->refs > 0)
     return;
+  tor_assert(env->refs == 0);
 
   if (env->key)
     RSA_free(env->key);

+ 1 - 1
src/or/router.c

@@ -575,7 +575,7 @@ init_keys(void)
    * otherwise, set the server identity key as our client identity
    * key. */
   if (public_server_mode(options)) {
-    set_client_identity_key(prkey); /* set above */
+    set_client_identity_key(crypto_pk_dup_key(prkey)); /* set above */
   } else {
     if (!(prkey = crypto_new_pk_env()))
       return -1;