Skip to content

Commit 6d5c34f

Browse files
committed
fix(ffi): Free error message in test_error_handling to prevent leak
The test triggers multiple errors but didn't free the final error message, causing a 37-byte memory leak detected by AddressSanitizer.
1 parent c191003 commit 6d5c34f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

key-wallet-ffi/tests/integration_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,6 @@ fn test_error_handling() {
211211
};
212212
assert!(wallet.is_null());
213213
assert_eq!(unsafe { (*error).code }, FFIErrorCode::InvalidInput);
214+
215+
unsafe { (*error).free_message() };
214216
}

0 commit comments

Comments
 (0)