projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d022831
)
Curl_fillreadbuffer: avoid double-free trailer buf on error
32/216632/1
accepted/tizen/base/20191105.214055
submit/tizen_base/20191031.113633
author
Seonah Moon
<seonah1.moon@samsung.com>
Wed, 30 Oct 2019 02:34:31 +0000
(11:34 +0900)
committer
Seonah Moon
<seonah1.moon@samsung.com>
Wed, 30 Oct 2019 02:34:35 +0000
(11:34 +0900)
Backported Patch link:
https://github.com/curl/curl/pull/4307
Change-Id: I5b695b661cf946b74e065d1a65697e74d7ef8af6
lib/http.c
patch
|
blob
|
history
diff --git
a/lib/http.c
b/lib/http.c
index
46ac15a
..
1be9c0f
100644
(file)
--- a/
lib/http.c
+++ b/
lib/http.c
@@
-1095,10
+1095,14
@@
Curl_send_buffer *Curl_add_buffer_init(void)
*/
void Curl_add_buffer_free(Curl_send_buffer **inp)
{
- Curl_send_buffer *in = *inp;
- if(in) /* deal with NULL input */
+ Curl_send_buffer *in;
+ if(!inp)
+ return;
+ in = *inp;
+ if(in) { /* deal with NULL input */
free(in->buffer);
- free(in);
+ free(in);
+ }
*inp = NULL;
}