Closed minerba closed 2 years ago
Could you please provide a sample (yaml) or gdb call stack ?
The example delete_pod has passed valgrind test. No memory leak is reported.
Hi @ityuhui
In normal cases, memory leak does not occur, but if (__namespace == NULL) Memory leak occurs.
char* localVarToReplace_name = malloc(sizeOfPathParams_name);
sprintf(localVarToReplace_name, "{%s}", "name");
localVarPath = strReplace(localVarPath, localVarToReplace_name, name);
// Path Params
long sizeOfPathParams_namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }");
if(_namespace == NULL) {
goto end;
}
============= end ==============
end:
free(localVarPath);
return NULL;
Thank you @minerba I got it.
It's a problem. But I think its severity is low because only if _namespace == NULL
, it will reproduce. So I will fix this some times later.
The fix solution is:
end
code block.
https://github.com/OpenAPITools/openapi-generator/blob/fbb61658dfbcc2c1f5087511b0f74756553791ad/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache#L116@ityuhui thanks for your reply. I hope it will be fixed soon
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closing this issue.
Hi
I found some defect that Memory Leak in CoreV1API.c
In the "CoreV1API_deleteNamespacedPod" function, the localVarToReplace variable calls malloc, but if the __namespace variable is NULL, it moves to end and the function ends without calling free. Other functions are also confirmed to have memory leak.
It needs to be fixed as soon as possible.