Fix double free in bridging curl client 17/25317/2
authorMats Wichmann <mats@linux.com>
Sat, 19 May 2018 14:25:47 +0000 (08:25 -0600)
committerMats Wichmann <mats@linux.com>
Thu, 7 Jun 2018 12:41:02 +0000 (12:41 +0000)
A recent change added a destructor for _MemoryChunk, to
fix a problem where something was not being freed.
However, this left another location freeing memory
twice - once explicitly, once when the destructor runs.

Change-Id: Ie10829334238a359e38c55df789d3e69425f67b3
Signed-off-by: Mats Wichmann <mats@linux.com>
bridging/common/curlClient.cpp

index 5a7004f..71729e8 100644 (file)
@@ -172,10 +172,6 @@ CLEANUP:
         curl_slist_free_all(headers);
     }
 
-    free(rsp_body.memory);
-
-    free(rsp_header.memory);
-
     if (NULL != curl)
     {
         curl_easy_cleanup(curl);