mirror of
https://github.com/RubyMetric/chsrc
synced 2026-01-12 07:19:01 +08:00
修复 xy_detect_os 内存泄露
This commit is contained in:
5
lib/xy.h
5
lib/xy.h
@@ -1351,9 +1351,10 @@ xy_detect_os ()
|
|||||||
fp = popen ("uname -s", "r");
|
fp = popen ("uname -s", "r");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
if (opendir ("/etc/rc.d"))
|
DIR *bsd_dir = opendir ("/etc/rc.d");
|
||||||
|
if (bsd_dir)
|
||||||
{
|
{
|
||||||
closedir (d);
|
closedir (bsd_dir);
|
||||||
xy.on_bsd = true;
|
xy.on_bsd = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user