Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] Check return value of ftruncate call in http.c. Remove possible mem leak

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:47:13

Hi,

On Mon, Aug 10, 2009 at 9:42 PM, Jeff Lasslett[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -1216,10 +1220,12 @@ struct http_object_request *new_http_object_request(const char *base_url,
                                CURLOPT_HTTPHEADER, range_header);
       }

+       free(url);
       return freq;

-       free(url);
Freeing after the return didn't make sense. Thanks for spotting this.

On a side note, you could simply do away with the 'url' variable,
since you're going to pass freq->url to curl_setopt.

-- 
Cheers,
Ray Chuan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help