mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
fix sigsegv on SIGUSR1
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@736 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
a3b5a1a1c2
commit
88024b07ce
@ -405,7 +405,9 @@ inline static void update_stat()
|
||||
unsigned int malloc_cpu_size=0;
|
||||
|
||||
|
||||
if (!cpu_setup) {
|
||||
/* added check for !info.cpu_usage since that mem is freed on a SIGUSR1
|
||||
* and linux.c was assuming it ws still allocated, leading to a sigsegv */
|
||||
if (!cpu_setup || !info.cpu_usage) {
|
||||
get_cpu_count();
|
||||
cpu_setup = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user