From 1076e13bd5919c9c62a17eea2140a3f167230239 Mon Sep 17 00:00:00 2001 From: Yevgeniy Miretskiy Date: Sun, 6 Dec 2020 11:11:52 -0500 Subject: [PATCH] bulkio: Do not close GCS storage prematurely. Fixes #57611 Fix a crash when creating backup schedules to GCS bucket due to nil pointer. Release Notes: Do not crash when creating backup schedules writing to GCS buckets. --- pkg/ccl/backupccl/create_scheduled_backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ccl/backupccl/create_scheduled_backup.go b/pkg/ccl/backupccl/create_scheduled_backup.go index bda700d4c6ab..d0e7a142a54f 100644 --- a/pkg/ccl/backupccl/create_scheduled_backup.go +++ b/pkg/ccl/backupccl/create_scheduled_backup.go @@ -405,7 +405,7 @@ func checkForExistingBackupsInCollection( if err != nil { return err } - defaultStore.Close() + defer defaultStore.Close() r, err := defaultStore.ReadFile(ctx, latestFileName) if err == nil {