diff options
| author | ishaan <contact@ishaan.cc> | 2026-08-20 14:03:30 +0530 |
|---|---|---|
| committer | ishaan <contact@ishaan.cc> | 2026-08-20 14:03:30 +0530 |
| commit | 7caaf4c96d4f657d9193baf48e9745c9f68181c9 (patch) | |
| tree | abcdb288540f465b1e39a9c6fa4b6bf94cefa65e /internal/crud/cli_new_pass.go | |
| parent | c7b546fb94687a6cbe9bab9db041d15104c5111d (diff) | |
fix: wipe temp file before removal to prevent leak
Diffstat (limited to 'internal/crud/cli_new_pass.go')
| -rw-r--r-- | internal/crud/cli_new_pass.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/crud/cli_new_pass.go b/internal/crud/cli_new_pass.go index c18ddc6..2a8c2f4 100644 --- a/internal/crud/cli_new_pass.go +++ b/internal/crud/cli_new_pass.go @@ -119,8 +119,8 @@ func NewNotePassEdit(output, editorString string) error { crypt.TryMlock(plaintext) defer clear(plaintext) - defer deferredCleanTmpFile(tmpFile, len(plaintext)) defer os.Remove(tmpFile.Name()) + defer deferredCleanTmpFile(tmpFile, len(plaintext)) _, err = tmpFile.Write(plaintext) if err != nil { |