Zero out sensitive memory before freeing (#17750)

This commit is contained in:
Jarred Sumner
2025-02-26 23:34:50 -08:00
committed by GitHub
parent cc481465b5
commit 0237baee92
5 changed files with 27 additions and 14 deletions

View File

@@ -2122,7 +2122,9 @@ pub const PostgresSQLConnection = struct {
this.write_buffer.deinit(bun.default_allocator);
this.read_buffer.deinit(bun.default_allocator);
this.backend_parameters.deinit();
bun.default_allocator.free(this.options_buf);
bun.freeSensitive(bun.default_allocator, this.options_buf);
this.tls_config.deinit();
bun.default_allocator.destroy(this);
}