aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils/cygcheck.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 17b9d94..1c3ae4a 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -130,7 +130,10 @@ add_path (char *s, int maxlen)
*--e = 0;
for (int i = 1; i < num_paths; i++)
if (strcasecmp (paths[num_paths], paths[i]) == 0)
- return;
+ {
+ free (paths[num_paths]);
+ return;
+ }
num_paths++;
}