On Fri, Feb 17, 2006 at 10:38:44PM -0500, Justin Pryzby wrote:

> In particular, I don't know if I need to free() the returned pointer,
> and I don't know if the value is overwritten by successive failures
> (though I can't why it would be implemented in any way that cause
> this, I guess it is best to ask).

It functions by analogy with strerror(): you can't do anything with the
string except read it and future calls to gzerror() may overwrite it.

> However, I just checked the code, and it seems that the error message is
> *sometimes* mallocated, and *sometimes* an element of a static string
> list.  Please document, at least, that the returned pointer should not
> be freed (since, even if it is mallocated, it is presumably freed with
> the stream, and we want consistency and to avoid a double free..)

I'll send something upstream.

-- 
"You grabbed my hand and we fell into it, like a daydream - or a fever."

Attachment: signature.asc
Description: Digital signature

Reply via email to