Skip to content

Commit

Permalink
[C][Client][Clang Static Analyzer] Remove the useless free operation …
Browse files Browse the repository at this point in the history
…for (#7309)

buffContent
  • Loading branch information
ityuhui authored Aug 28, 2020
1 parent f681016 commit 2c65605
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions samples/client/petstore/c/src/apiClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2c65605

Please sign in to comment.