Skip to content

Commit

Permalink
Merge pull request qiniu#112 from qiniu/develop
Browse files Browse the repository at this point in the history
Release v6.2.2
  • Loading branch information
xushiwei committed Oct 14, 2013
2 parents d95026d + ff3b582 commit 3cd41f3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## CHANGE LOG


### v6.2.2

2013-10-14 issue [#112](https://github.com/qiniu/c-sdk/pull/112)

- 解决几个内存泄漏


### v6.2.1

2013-07-25 issue [#102](https://github.com/qiniu/c-sdk/pull/102), [#104](https://github.com/qiniu/c-sdk/pull/104)
Expand Down
16 changes: 15 additions & 1 deletion qiniu/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,14 @@ Qiniu_Error Qiniu_Client_Call(Qiniu_Client* self, Qiniu_Json** ret, const char*

curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);


err = Qiniu_callex(curl, &self->b, &self->root, Qiniu_False, &self->respHeader);
/*
* Bug No.(4601) Wang Xiaotao 2013\10\12 17:09:02
* Change for : free var headers 'variable'
* Reason : memory leak!
*/
curl_slist_free_all(headers);
*ret = self->root;
return err;
}
Expand All @@ -348,6 +355,13 @@ Qiniu_Error Qiniu_Client_CallNoRet(Qiniu_Client* self, const char* url)

curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);

return Qiniu_callex(curl, &self->b, &self->root, Qiniu_False, &self->respHeader);
/*
* Bug No.(4601) Wang Xiaotao 2013\10\12 17:09:02
* Change for : free var headers 'variable'
* Reason : memory leak!
*/
err = Qiniu_callex(curl, &self->b, &self->root, Qiniu_False, &self->respHeader);
curl_slist_free_all(headers);
return err;
}

0 comments on commit 3cd41f3

Please sign in to comment.