aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-10 16:22:49 +0000
committerChristopher Faylor <me@cgf.cx>2003-09-10 16:22:49 +0000
commit4018776f6e72a2e612eab9e4fc975ad293d70bc5 (patch)
tree92b38ad66f6c6a3fe13e66bfc2888e0fbe4b07be
parent080ef411359ffe4c8b5f03ab5fce9da900e40381 (diff)
downloadnewlib-4018776f6e72a2e612eab9e4fc975ad293d70bc5.zip
newlib-4018776f6e72a2e612eab9e4fc975ad293d70bc5.tar.gz
newlib-4018776f6e72a2e612eab9e4fc975ad293d70bc5.tar.bz2
* Makefile.in: Add some more -fomit-frame-pointer files.
* path.cc (conv_path_list_buf_size): Free normalized_path or suffer memory leak. * syscalls.cc (chroot): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog10
-rw-r--r--winsup/cygwin/Makefile.in4
-rw-r--r--winsup/cygwin/path.cc4
-rw-r--r--winsup/cygwin/syscalls.cc2
4 files changed, 19 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 6212ac9..1bfe052 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2003-09-10 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in: Add some more -fomit-frame-pointer files.
+
+ * path.cc (conv_path_list_buf_size): Free normalized_path or suffer
+ memory leak.
+ * syscalls.cc (chroot): Ditto.
+
2003-09-10 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Add bsdlib.o.
@@ -48,7 +56,7 @@
* mmap.cc (mmap64): Change address types from caddr_t to void *
according to SUSv3.
- (mmap): Ditto.
+ (mmap): Ditto.
(munmap): Ditto.
(msync): Ditto.
(mprotect): Ditto. Move to before the fhandler methods.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 13227a5..5045b1f 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -73,6 +73,10 @@ fhandler_tty_CFLAGS:=-fomit-frame-pointer
fhandler_virtual_CFLAGS:=-fomit-frame-pointer
fhandler_windows_CFLAGS:=-fomit-frame-pointer
fhandler_zero_CFLAGS:=-fomit-frame-pointer
+regcomp_CFLAGS=-fomit-frame-pointer
+regerror_CFLAGS=-fomit-frame-pointer
+regexec_CFLAGS=-fomit-frame-pointer
+regfree_CFLAGS=-fomit-frame-pointer
CC:=@CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 5811497..6412a8a 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3653,6 +3653,10 @@ conv_path_list_buf_size (const char *path_list, bool to_posix)
+ (num_elms * max_mount_path_len)
+ (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
+ 100;
+
+ cfree (pc.normalized_path); // FIXME - probably should be in a destructor but
+ // it's hard to justify a destructor for the few
+ // places where this is needed
return size;
}
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 7537121..0880c3f 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2373,6 +2373,8 @@ chroot (const char *newroot)
syscall_printf ("%d = chroot (%s)", ret ? get_errno () : 0,
newroot ? newroot : "NULL");
+ if (path.normalized_path)
+ cfree (path.normalized_path);
return ret;
}