소스 검색

Add a note to PORTING.md about free/OPENSSL_free mixups.

Change-Id: I7cf0e67148c0908e5a4c670251419a8bc15fbea9
Reviewed-on: https://boringssl-review.googlesource.com/20109
Reviewed-by: Martin Kreichgauer <martinkr@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 년 전
부모
커밋
6881ec0465
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. +11
    -0
      PORTING.md

+ 11
- 0
PORTING.md 파일 보기

@@ -165,6 +165,17 @@ recommended to avoid the `out` parameter completely and always pass in `NULL`.
Note that less error-prone APIs are available for BoringSSL-specific code (see
below).

### Memory allocation

OpenSSL provides wrappers `OPENSSL_malloc` and `OPENSSL_free` over the standard
`malloc` and `free`. Memory allocated by OpenSSL should be released with
`OPENSSL_free`, not the standard `free`. However, by default, they are
implemented directly using `malloc` and `free`, so code which mixes them up
usually works.

In BoringSSL, these functions maintain additional book-keeping to zero memory
on `OPENSSL_free`, so any mixups must be fixed.

## Optional BoringSSL-specific simplifications

BoringSSL makes some changes to OpenSSL which simplify the API but remain


불러오는 중...
취소
저장