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>2008-05-20 14:18:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-05-20 14:18:12 +0400
commitc211f8eb243cf08ec269a7ec23bf43f37967341b (patch)
tree2b32669222e6c492a9e6013796dbbc004bf42afe /winsup/cygwin/path.h
parent78ee2ae11faa2e63ee909541bdc0d9ddb3a09429 (diff)
* 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.h')
-rw-r--r--winsup/cygwin/path.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index ab6dda79a..e09507c80 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -206,35 +206,42 @@ class path_conv
void check (const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
- path_conv (const device& in_dev): fileattr (INVALID_FILE_ATTRIBUTES),
- wide_path (NULL), path_flags (0), known_suffix (NULL), error (0),
- dev (in_dev)
- {
- strcpy (path, in_dev.native);
- }
+ path_conv (const device& in_dev)
+ : fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path_flags (0),
+ known_suffix (NULL), error (0), dev (in_dev), normalized_path (NULL),
+ normalized_path_size (0)
+ {
+ strcpy (path, in_dev.native);
+ }
path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
+ : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
{
check (src, opt, suffixes);
}
path_conv (const UNICODE_STRING *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
+ : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
{
check (src, opt | PC_NULLEMPTY, suffixes);
}
path_conv (const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
+ : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
{
check (src, opt | PC_NULLEMPTY, suffixes);
}
- path_conv (): fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL),
- path_flags (0), known_suffix (NULL), error (0),
- normalized_path (NULL)
- {path[0] = '\0';}
+ path_conv ()
+ : fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path_flags (0),
+ known_suffix (NULL), error (0), normalized_path (NULL),
+ normalized_path_size (0)
+ {
+ path[0] = '\0';
+ }
~path_conv ();
inline char *get_win32 () { return path; }