[MONGOCRYPT-58] Add a way to free detached strings Created: 19/Mar/19 Updated: 28/Oct/23 Resolved: 16/Apr/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Mark Benvenuto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | Build libmongocrypt library |
| Description |
|
When methods like kms_request_get_signed return char* pointers, kms-message needs to provide a method so the parent library can free the return char* pointer back into the heap it was allocated on. Basically, just write kms_request_free(void*) and have it call free(). This will ensure that if kms-message is used as a shared library, the memory it allocates is correctly freed. |
| Comments |
| Comment by Mark Benvenuto [ 16/Apr/19 ] |
|
Fixed with https://github.com/10gen/kms-message/commit/75e391a037d30941f8cad17568ea9bdd37962127 |