From 2c656052899beae8e42dace0aebcbdec8ec60f2d Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Sat, 29 Aug 2020 00:17:55 +0800 Subject: [PATCH] [C][Client][Clang Static Analyzer] Remove the useless free operation for (#7309) buffContent --- .../src/main/resources/C-libcurl/apiClient.c.mustache | 4 ---- samples/client/petstore/c/src/apiClient.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index 900a986cb081..f8f374d23a08 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -520,10 +520,6 @@ void apiClient_invoke(apiClient_t *apiClient, free(targetUrl); - if(contentType != NULL) { - free(buffContent); - } - if(res == CURLE_OK) { curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &apiClient->response_code); } else { diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index e156bc53b959..cb77e9c61987 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -437,10 +437,6 @@ void apiClient_invoke(apiClient_t *apiClient, free(targetUrl); - if(contentType != NULL) { - free(buffContent); - } - if(res == CURLE_OK) { curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &apiClient->response_code); } else {