mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 15:35:51 +03:00
[PR #240] [MERGED] client/CreateQemuVM: only read body if existing #334
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/240
Author: @lbajolet-hashicorp
Created: 2/22/2023
Status: ✅ Merged
Merged: 3/2/2023
Merged by: @mleone87
Base:
master← Head:fix_crash_create_qemu_vm📝 Commits (1)
f63ca55client/CreateQemuVM: only read body if existing📊 Changes
1 file changed (+12 additions, -6 deletions)
View changed files
📝
proxmox/client.go(+12 -6)📄 Description
Working on Packer, we noticed that on many occasions the plugin crashes because the call to
resp.Body.Close()panics with a null pointer dereference.Unsure if this is because the
respobject is null, or if theresp.Bodyis, but to avoid this problem, we only read and defer closing the body when it is available.See for example the following issues:
Please let me know if there's anything I can do to help test this, I don't have a Proxmox installation to test it on, and am mostly going with the stack traces provided in the aforementioned issues.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.