cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: newbie question

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 24 Aug 2004 22:19:59 +0200 (CEST)

On Tue, 24 Aug 2004, Michael Mastroianni wrote:

> Suppose I want to get the effective url for a download. My understanding
> is that I do:

> curl_easy_getinfo(curlHandle_, CURLINFO_EFFECTIVE_URL, &newurl);
>
> Now, I don't want to leak. Do I curl_free(newurl)?

...

> I think the last one is right, from the documentation, but I wanted to be
> sure.

The documentation says nothing about needing to free the data and you
shouldn't.

You want the curl_easy_getinfo man page to explicitly say you should not free
it? Would that have helped you?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-24