diff --git a/vsphere/internal/helper/contentlibrary/content_library_helper.go b/vsphere/internal/helper/contentlibrary/content_library_helper.go index 71519097b..df164b37b 100644 --- a/vsphere/internal/helper/contentlibrary/content_library_helper.go +++ b/vsphere/internal/helper/contentlibrary/content_library_helper.go @@ -168,9 +168,6 @@ func CreateLibraryItem(c *rest.Client, l *library.Library, name string, desc str if err != nil { return nil, provider.ProviderError(name, "CreateLibraryItem", err) } - defer func() { - _ = clm.CompleteLibraryItemUpdateSession(ctx, session) - }() uploadSession.UploadSession = session defer func() { _ = clm.CompleteLibraryItemUpdateSession(ctx, session)