From b85df8a6142b40c02ac8d50937bc053b6b5a3ea7 Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Fri, 28 Aug 2020 22:28:45 +0800 Subject: [PATCH] [C][Client][Clang Static Analyzer] Remove the useless free operation for 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 {