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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Aug 10, 2009 at 9:42 PM, Jeff Lasslett<jeff.lasslett@xxxxxxxxx> wrote:
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]