Skip to content

Commit 2c65605

Browse files
authored
[C][Client][Clang Static Analyzer] Remove the useless free operation for (#7309)
buffContent
1 parent f681016 commit 2c65605

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,6 @@ void apiClient_invoke(apiClient_t *apiClient,
520520

521521
free(targetUrl);
522522

523-
if(contentType != NULL) {
524-
free(buffContent);
525-
}
526-
527523
if(res == CURLE_OK) {
528524
curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &apiClient->response_code);
529525
} else {

samples/client/petstore/c/src/apiClient.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ void apiClient_invoke(apiClient_t *apiClient,
437437

438438
free(targetUrl);
439439

440-
if(contentType != NULL) {
441-
free(buffContent);
442-
}
443-
444440
if(res == CURLE_OK) {
445441
curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &apiClient->response_code);
446442
} else {

0 commit comments

Comments
 (0)