2009/7/8 Vin Shelton <ethersoft(a)gmail.com>:
Hi, Reini -
Thanks for sending this along. I had the start of a similar patch in
my workspace, but yours goes further.
Sorry this has taken awhile for my feedback. I have a couple of comments:
1. Please explain the '260 + 1001' values in your patch. In cygwin
1.7, PATH_MAX is 4096, shouldn't you use that?
4096 can also be used.
I just took this arbitrarily looking logic 260 + 1001 from the cygwin
sources itself
to precalculate the expanded length.
On Tue, Jun 30, 2009 at 2:54 AM, Reini Urban<rurban(a)x-ray.at>
wrote:
> /* Find the first matching file */
> @@ -454,7 +506,10 @@
>
> /* Release the path name buffers */
> free (fullpath);
> - free (arg);
> +#ifdef __CYGWIN__
> + if (err)
> + free (arg);
> +#endif
>
> if (ret)
> break;
>
2. There was an unconditional
free (arg);
there. Did you mean to remove it?
This last
- free (arg);
+#ifdef __CYGWIN__
+ if (err)
+ free (arg);
+#endif
was causing me headaches and crashes. arg is already freed, because
arg = fullpath; for cygwin only.
Just in the err case arg is a single unfreed pointer.
Maybe it should be documented in the source also.
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta