소스 검색

Fix a memory leak in an error case of SAFECOOKIE authentication.

Found by Coverity Scan; fix for CID 507; bugfix on 0.2.3.13-alpha.
Nick Mathewson 13 년 전
부모
커밋
affbcded5c
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      changes/memleak_safecookie
  2. 1 0
      src/or/control.c

+ 4 - 0
changes/memleak_safecookie

@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Fix a small memory leak when trying to decode incorrect base16
+      authenticator during SAFECOOKIE authentication. Found by
+      Coverity Scan. Fixes CID 507. Bugfix on 0.2.3.13-alpha.

+ 1 - 0
src/or/control.c

@@ -3020,6 +3020,7 @@ handle_control_authchallenge(control_connection_t *conn, uint32_t len,
       connection_write_str_to_buf("513 Invalid base16 client nonce",
                                   conn);
       connection_mark_for_close(TO_CONN(conn));
+      tor_free(client_nonce);
       return -1;
     }