summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygheap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index d6caf3355..f0efabf2f 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -330,6 +330,15 @@ cstrdup1 (const char *s)
void
cygheap_root::set (const char *posix, const char *native)
{
+ if (*posix == '/' && posix[1] == '\0')
+ {
+ if (m)
+ {
+ cfree (m);
+ m = NULL;
+ }
+ return;
+ }
if (!m)
m = (struct cygheap_root_mount_info *) ccalloc (HEAP_MOUNT, 1, sizeof (*m));
strcpy (m->posix_path, posix);