diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 10:18:12 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-05-20 10:18:12 +0000 |
commit | c211f8eb243cf08ec269a7ec23bf43f37967341b (patch) | |
tree | 2b32669222e6c492a9e6013796dbbc004bf42afe /winsup/cygwin/path.cc | |
parent | 78ee2ae11faa2e63ee909541bdc0d9ddb3a09429 (diff) | |
download | cygnal-c211f8eb243cf08ec269a7ec23bf43f37967341b.tar.gz cygnal-c211f8eb243cf08ec269a7ec23bf43f37967341b.tar.bz2 cygnal-c211f8eb243cf08ec269a7ec23bf43f37967341b.zip |
* path.cc (path_conv::check): Free wide_path and normalized_path if
necessary.
* path.h (path_conv::path_conv): Set wide_path, normalized_path and
normalized_path_size to 0 in all constructors.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 1c1217d9d..bdaead55d 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -812,10 +812,14 @@ path_conv::check (const char *src, unsigned opt, path_flags = 0; known_suffix = NULL; fileattr = INVALID_FILE_ATTRIBUTES; + if (wide_path) + cfree (wide_path); wide_path = NULL; case_clash = false; memset (&dev, 0, sizeof (dev)); fs.clear (); + if (!normalized_path_size && normalized_path) + cfree (normalized_path); normalized_path = NULL; int component = 0; // Number of translated components |