mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-24 11:55:43 +00:00
Fixed memory leaks found with valgrind
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@875 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
615fb19723
commit
3872bafeef
@ -7250,6 +7250,7 @@ int main(int argc, char **argv)
|
||||
for (x = 0; x < strlen(s); x++) {
|
||||
temp[x] = tolower(s[x]);
|
||||
}
|
||||
temp[x] = 0;
|
||||
if (strstr(temp, "utf-8") || strstr(temp, "utf8")) {
|
||||
utf8_mode = 1;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ static int process_parse_stat(struct process *process)
|
||||
{
|
||||
struct information *cur;
|
||||
cur = &info;
|
||||
char line[BUFFER_LEN], filename[BUFFER_LEN], procname[BUFFER_LEN];
|
||||
char line[BUFFER_LEN] = { 0 }, filename[BUFFER_LEN], procname[BUFFER_LEN];
|
||||
int ps;
|
||||
unsigned long user_time = 0;
|
||||
unsigned long kernel_time = 0;
|
||||
@ -356,7 +356,7 @@ static unsigned long long calc_cpu_total()
|
||||
unsigned long long t = 0;
|
||||
int rc;
|
||||
int ps;
|
||||
char line[BUFFER_LEN];
|
||||
char line[BUFFER_LEN] = { 0 };
|
||||
unsigned long long cpu = 0;
|
||||
unsigned long long nice = 0;
|
||||
unsigned long long system = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user