Fix panic in lisafs

When mount fails, `filesystem.Release()` attempts to dereference a nil
`filesystem.clientLisa`.

PiperOrigin-RevId: 482027422
This commit is contained in:
Fabricio Voznika
2022-10-18 14:48:34 -07:00
committed by gVisor bot
parent cf1320ce50
commit c6c38d5c4b
+6 -2
View File
@@ -743,9 +743,13 @@ func (fs *filesystem) Release(ctx context.Context) {
if !fs.iopts.LeakConnection {
// Close the connection to the server. This implicitly clunks all fids.
if fs.opts.lisaEnabled {
fs.clientLisa.Close()
if fs.clientLisa != nil {
fs.clientLisa.Close()
}
} else {
fs.client.Close()
if fs.client != nil {
fs.client.Close()
}
}
}