kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
144 stars 46 forks source link

Define and initialize non-primitive variables at the beginning of function #92

Closed ityuhui closed 2 years ago

ityuhui commented 2 years ago

Fixes https://github.com/kubernetes-client/c/issues/89

As suggested by @brendandburns, define and initialize non-primitive variables at the beginning of function to avoid freeing invalid variables.

The fix is actually made in https://github.com/OpenAPITools/openapi-generator/pull/10756, now re-generate the client to merge the fix.

ityuhui commented 2 years ago

/cc @brendandburns

brendandburns commented 2 years ago

/lgtm /approve

Thanks for driving this change.

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, ityuhui

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-client/c/blob/master/OWNERS)~~ [brendandburns,ityuhui] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment