diff options
author | Christopher Faylor <me@cgf.cx> | 2010-04-09 20:51:08 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-04-09 20:51:08 +0400 |
commit | 412f3e61d4a3e5eca549f87babaa6ebe4c0cace5 (patch) | |
tree | d1f37201e7d3cc30afc4ffbe6598e9d8702e1600 /winsup/cygwin/path.h | |
parent | 5d239c6195bf61b49946a232320cdf81d3fac153 (diff) |
* path.cc (path_conv::set_normalized_path): Use crealloc_abort to avoid a
memory leak.
* path.h (path_conv::operator =): Just use cstrdup to allocate normalized_path,
avoiding attempt to free a pointer which is allocated in another pc.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 2f583e9e7..855f4a26d 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -217,7 +217,7 @@ class path_conv { memcpy (this, &pc, sizeof pc); path = cstrdup (pc.path); - set_normalized_path (pc.normalized_path); + normalized_path = cstrdup(pc.normalized_path); wide_path = NULL; return *this; } |