-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Looking at lib/sh/pathphys.c, it looks like sh_realpath() has a memory
leak.  Line 288 copies wd into resolved, then returns resolved without
ever freeing wd.  Meanwhile, for systems that provide POSIX realpath(3)
with the additional semantics that realpath (path, NULL) malloc's the
result, why not implement sh_physpath as a call to realpath?  In
particular, cygwin is one of these systems, so you could remove all the
__CYGWIN__ hacks about checking for drive letters in favor of calling
realpath, which on cygwin does the right thing in the presence of drive
letters.

- --
Life is short - so eat dessert first!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDENCb84KuGfSFAYARAouBAKCd5uEfbT8jC/Y7ZPyb+rGQA4J8rwCgteKy
r/mwaPUwwiSipKmNPBEH+9w=
=NiJh
-----END PGP SIGNATURE-----


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to