Skip to content

Commit a891d34

Browse files
authored
fix: solve null pointer reference when unmarshaling (#658)
1 parent c277875 commit a891d34

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sysdig/internal/client/v2/organization.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func (c *Client) CreateOrganizationSecure(ctx context.Context, org *Organization
4141
return nil, errStatus, err
4242
}
4343

44+
organization = &OrganizationSecure{}
4445
err = c.unmarshalCloudauthProto(response.Body, organization)
4546
if err != nil {
4647
return nil, "", err
@@ -64,6 +65,7 @@ func (c *Client) GetOrganizationSecure(ctx context.Context, orgID string) (organ
6465
return nil, errStatus, err
6566
}
6667

68+
organization = &OrganizationSecure{}
6769
err = c.unmarshalCloudauthProto(response.Body, organization)
6870
if err != nil {
6971
return nil, "", err
@@ -110,6 +112,7 @@ func (c *Client) UpdateOrganizationSecure(ctx context.Context, orgID string, org
110112
return nil, errStatus, err
111113
}
112114

115+
organization = &OrganizationSecure{}
113116
err = c.unmarshalCloudauthProto(response.Body, organization)
114117
if err != nil {
115118
return nil, "", err

0 commit comments

Comments
 (0)