projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
389086e
)
fixed bug: invalid read during psensor termination
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sat, 23 Jul 2011 22:55:35 +0000
(22:55 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sat, 23 Jul 2011 22:55:35 +0000
(22:55 +0000)
(while sensors memory structures are unallocated the update measures thread was still running)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
5ee6c96
..
a56e043
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-405,9
+405,9
@@
int main(int argc, char **argv)
/* main loop */
gtk_main();
-
psensor_cleanup(
);
+
g_mutex_lock(ui.sensors_mutex
);
- psensor_
list_free(ui.sensors
);
+ psensor_
cleanup(
);
#ifdef HAVE_NVIDIA
nvidia_cleanup();
@@
-415,5
+415,11
@@
int main(int argc, char **argv)
#ifdef HAVE_LIBATIADL
amd_cleanup();
#endif
+
+ psensor_list_free(ui.sensors);
+ ui.sensors = NULL;
+
+ g_mutex_unlock(ui.sensors_mutex);
+
return 0;
}