projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
72b04f1
)
fixed memory leak (sensor name when specified by the
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Tue, 17 Apr 2012 08:25:58 +0000
(08:25 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Tue, 17 Apr 2012 08:25:58 +0000
(08:25 +0000)
configuration).
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
95163e0
..
89cf2b9
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-308,8
+308,10
@@
static void associate_preferences(struct psensor **sensors)
n = config_get_sensor_name(s->id);
- if (n)
+ if (n) {
+ free(s->name);
s->name = n;
+ }
sensor_cur++;
}
@@
-528,6
+530,8
@@
int main(int argc, char **argv)
/* main loop */
gtk_main();
+ log_debug("Quitting...");
+
g_mutex_lock(ui.sensors_mutex);
psensor_cleanup();
@@
-555,6
+559,8
@@
int main(int argc, char **argv)
config_cleanup();
+ log_debug("Cleanup done, closing log");
+
log_close();
return 0;