remove queue only if index is within the range (#9341)

Fixes minio/mc#3155
master
Bala FA 5 years ago committed by GitHub
parent 9054ce73b2
commit 525287f4b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/bucket-notification-handlers.go

@ -116,7 +116,7 @@ func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter,
// With newer config disallowing changing / turning off
// notification targets without removing ARN in notification
// configuration we won't see this problem anymore.
if reflect.DeepEqual(queue.ARN, arnErr.ARN) {
if reflect.DeepEqual(queue.ARN, arnErr.ARN) && i < len(config.QueueList) {
config.QueueList = append(config.QueueList[:i],
config.QueueList[i+1:]...)
}

Loading…
Cancel
Save