diff options
author | Yang Gao <yangg@google.com> | 2015-02-02 14:44:53 -0800 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-02-02 14:44:53 -0800 |
commit | 24e820b226e36b6a28b16a7e650106014360a44d (patch) | |
tree | 91fb034d70cdb9629b8c43520611dc13f4aa436c /src/core | |
parent | 7f791669df8a7728bc5aa3c52246a15d7aebe370 (diff) |
Fix a memory leak.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/httpcli/format_request.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/httpcli/format_request.c b/src/core/httpcli/format_request.c index 58bb7c740e..5d1a04ef82 100644 --- a/src/core/httpcli/format_request.c +++ b/src/core/httpcli/format_request.c @@ -105,6 +105,8 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, } gpr_strvec_add(&out, gpr_strdup("\r\n")); tmp = gpr_strvec_flatten(&out, &out_len); + gpr_strvec_destroy(&out); + if (body_bytes) { tmp = gpr_realloc(tmp, out_len + body_size); memcpy(tmp + out_len, body_bytes, body_size); |