Date: Fri, 11 May 2012 18:54:32 +0400 From: Andrey Chernov <ache@FreeBSD.ORG> To: Konstantin Belousov <kib@FreeBSD.ORG> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r235266 - head/lib/libc/stdlib Message-ID: <20120511145432.GA19173@vniz.net> In-Reply-To: <201205111129.q4BBT85G081093@svn.freebsd.org> References: <201205111129.q4BBT85G081093@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, but in this two places old errno value should be saved across
free() because free() may damage it:
On Fri, May 11, 2012 at 11:29:08AM +0000, Konstantin Belousov wrote:
...
> + if (lstat(resolved, &sb) != 0) {
> + if (m)
> + free(resolved);
> +
return (NULL);
...
> + errno = ENOTDIR;
> if (m)
> free(resolved);
> return (NULL);
--
http://ache.vniz.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120511145432.GA19173>
