mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-18 23:12:15 +08:00
* cygcheck.cc (add_path): Don't leak memory when path is already in ``paths''.
This commit is contained in:
parent
7d032a010a
commit
76ad4d0a6e
@ -1,3 +1,8 @@
|
||||
2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
||||
|
||||
* cygcheck.cc (add_path): Don't leak memory when path is already in
|
||||
``paths''.
|
||||
|
||||
2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
||||
|
||||
* cygcheck.cc (dump_sysinfo): Warn about trailing (back)slash on mount
|
||||
|
@ -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)
|
||||
{
|
||||
free (paths[num_paths]);
|
||||
return;
|
||||
}
|
||||
num_paths++;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user