mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-20 13:34:32 +01:00
macaroons: don't zero mem if never unlocked
This commit is contained in:
parent
0c1b619e53
commit
92eebff64e
1 changed files with 3 additions and 1 deletions
|
@ -196,6 +196,8 @@ func (r *RootKeyStorage) RootKey(_ context.Context) ([]byte, []byte, error) {
|
|||
// Close closes the underlying database and zeroes the encryption key stored
|
||||
// in memory.
|
||||
func (r *RootKeyStorage) Close() error {
|
||||
r.encKey.Zero()
|
||||
if r.encKey != nil {
|
||||
r.encKey.Zero()
|
||||
}
|
||||
return r.DB.Close()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue