bug-radar
[Top][All Lists]
Advanced

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

Re: Silly question...


From: Jeff Bailey
Subject: Re: Silly question...
Date: Wed, 13 Feb 2002 16:25:08 -0800
User-agent: Mutt/1.2.5i

On Wed, Feb 13, 2002 at 03:13:44PM -0800, Jamshed Kakar wrote:
> Hi,
> 
> I've done some poking around for what appears to be a silly question
> but the answer doesn't seem to be overly obvious.  Do I have to free
> the char* returned by strerror ()?

http://www.gnu.org/manual/libc/html_chapter/libc_2.html#IDX203

strerror is statically allocated (and not threadsafe) - do not free
it.  strerror_r is thread safe, but I'm not sure if you need to free
it, or if it tracks it as static per-thread.  If you need that info, I
can check for you.

-- 
I want to go live with the guy who came up with the phrase "Free like
beer"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]