From 6d726717fd3e0f1c18949ef216a008e5ccdf2553 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 14 Sep 2018 18:22:11 +0000 Subject: [PATCH] Eolite and Sysmon: fixed memory leak git-svn-id: svn://kolibrios.org@7362 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/include/properties.h | 1 + programs/cmm/lib/fs.h | 2 +- programs/cmm/sysmon/compile_en.bat | 1 - programs/cmm/sysmon/sysmon.c | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 7f80f22d5a..45d603bbf4 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -175,6 +175,7 @@ void GetSizeDir(dword way) } } free(cur_file); + free(dirbuf); } } diff --git a/programs/cmm/lib/fs.h b/programs/cmm/lib/fs.h index 4535d98316..540daeea56 100644 --- a/programs/cmm/lib/fs.h +++ b/programs/cmm/lib/fs.h @@ -236,8 +236,8 @@ enum } else { - ESDWORD[file_count] = 0; ESDWORD[dir_buf] = free(buf); + ESDWORD[file_count] = 0; } return error; } diff --git a/programs/cmm/sysmon/compile_en.bat b/programs/cmm/sysmon/compile_en.bat index ab01f9cdf1..90a4f285ef 100644 --- a/programs/cmm/sysmon/compile_en.bat +++ b/programs/cmm/sysmon/compile_en.bat @@ -2,5 +2,4 @@ @c-- sysmon.c @rename *.com *.kex @del warning.txt -@kpack sysmon.kex @pause \ No newline at end of file diff --git a/programs/cmm/sysmon/sysmon.c b/programs/cmm/sysmon/sysmon.c index 66044a21e8..1d6c7780c2 100644 --- a/programs/cmm/sysmon/sysmon.c +++ b/programs/cmm/sysmon/sysmon.c @@ -105,6 +105,7 @@ void GetDirSizeAndCountFiles_loop(dword way) } } free(cur_file); + free(dirbuf); } }