Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-11-29 23:51:38 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-11-29 23:51:38 +0300
commit910e31f0154734f5bdfaa2d334a037eeeead295b (patch)
tree46e6f47514d3300a2c977c573109a405437a4c95 /winsup/cygwin/path.h
parent371a9496e89ff789def77bb25b1dac4b995584c8 (diff)
* fhandler_tty.cc (fhandler_tty_slave::dup): Free path_conv strings
to avoid memory leak. Add comment. (fhandler_pty_master::dup): Ditto. * path.h (path_conv::free_strings): New method.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r--winsup/cygwin/path.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index c5b10e3c7..ef6cac44e 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -293,6 +293,11 @@ class path_conv
wide_path = NULL;
return *this;
}
+ void free_strings ()
+ {
+ cfree (modifiable_path ());
+ cfree ((char *) normalized_path);
+ }
DWORD get_devn () const {return dev.devn;}
short get_unitn () const {return dev.minor;}
DWORD file_attributes () const {return fileattr;}