projects
/
systembsd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor, add ISC license blurbs to interfaces/foo/foo.h
[systembsd.git]
/
src
/
interfaces
/
timedated
/
timedated.c
diff --git
a/src/interfaces/timedated/timedated.c
b/src/interfaces/timedated/timedated.c
index 32f040a2f775dd1f25048f78c7676eff030c12e4..a0d536de09c7ad9c7a8813f8339495eaff8c6b98 100644
(file)
--- a/
src/interfaces/timedated/timedated.c
+++ b/
src/interfaces/timedated/timedated.c
@@
-152,6
+152,8
@@
void set_signal_handlers() {
int main() {
int main() {
+ set_signal_handlers();
+
timedated_loop = g_main_loop_new(NULL, TRUE);
timedated_freeable = g_ptr_array_new();
timedated_loop = g_main_loop_new(NULL, TRUE);
timedated_freeable = g_ptr_array_new();
@@
-165,11
+167,14
@@
int main() {
NULL);
g_main_loop_run(timedated_loop);
NULL);
g_main_loop_run(timedated_loop);
+ /* runs until single g_main_loop_quit() call is raised inside <interface>_mem_clean() */
g_main_loop_unref(timedated_loop);
g_main_loop_unref(timedated_loop);
+ /* guaranteed unownable */
g_bus_unown_name(bus_descriptor);
g_bus_unown_name(bus_descriptor);
- timedated_mem_clean();
+ /* at this point no operations can occur with our data, it is safe to free it + its container */
+ g_ptr_array_free(timedated_freeable, TRUE);
return 0;
}
return 0;
}