mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
fix: a possible crash in event target Close() (#17948)
these are possible crashes when the configured target is still in init() state and never finished - however a delete config was initiated.
This commit is contained in:
@@ -312,7 +312,11 @@ func (target *MySQLTarget) Close() error {
|
||||
_ = target.insertStmt.Close()
|
||||
}
|
||||
|
||||
return target.db.Close()
|
||||
if target.db != nil {
|
||||
return target.db.Close()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Executes the table creation statements.
|
||||
|
||||
Reference in New Issue
Block a user