diff options
author | Christopher Faylor <me@cgf.cx> | 2004-02-17 20:03:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-02-17 20:03:01 +0000 |
commit | 720c33ae4c9fb2fe10268e123d5b34a5042170e1 (patch) | |
tree | 6bf6a681bbfeee61d2da5170d94cbbaf3a80ba05 /winsup/cygwin/path.cc | |
parent | 88e584bf43ec8d63729f59c2e21e8dd4001e7e41 (diff) | |
download | cygnal-720c33ae4c9fb2fe10268e123d5b34a5042170e1.tar.gz cygnal-720c33ae4c9fb2fe10268e123d5b34a5042170e1.tar.bz2 cygnal-720c33ae4c9fb2fe10268e123d5b34a5042170e1.zip |
* Makefile.in (clean): Clean libserver, too.
* fhandler.cc (fhandler_base::~fhandler_base): Remove path_conv cleanup.
* syscalls.cc (chroot): Ditto.
* path.cc (path_conv::~path_conv): Define new destructor.
(conv_path_list_buf_size): Remove explicit path_conv cleanup.
* path.h (path_conv::~path_conv): Declare new destructor.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index a7d95df71..03f0a1262 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -882,6 +882,15 @@ out: #endif } +path_conv::~path_conv () +{ + if (!normalized_path_size && normalized_path) + { + cfree (normalized_path); + normalized_path = NULL; + } +} + static __inline int digits (const char *name) { @@ -3500,10 +3509,6 @@ conv_path_list_buf_size (const char *path_list, bool to_posix) + (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ())) + 100; - if (!pc.normalized_path_size && pc.normalized_path) - 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; } |