summaryrefslogtreecommitdiff
path: root/src/timesync
diff options
context:
space:
mode:
Diffstat (limited to 'src/timesync')
-rw-r--r--src/timesync/timesyncd-manager.c6
-rw-r--r--src/timesync/timesyncd-manager.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 07fee57391..8c2ee4cbec 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -915,9 +915,9 @@ void manager_flush_server_names(Manager *m, ServerType t) {
server_name_free(m->fallback_servers);
}
-void manager_free(Manager *m) {
+Manager* manager_free(Manager *m) {
if (!m)
- return;
+ return NULL;
manager_disconnect(m);
manager_flush_server_names(m, SERVER_SYSTEM);
@@ -934,7 +934,7 @@ void manager_free(Manager *m) {
sd_bus_flush_close_unref(m->bus);
- free(m);
+ return mfree(m);
}
static int manager_network_read_link_servers(Manager *m) {
diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h
index 37cf406190..af218a5f63 100644
--- a/src/timesync/timesyncd-manager.h
+++ b/src/timesync/timesyncd-manager.h
@@ -103,7 +103,7 @@ struct Manager {
};
int manager_new(Manager **ret);
-void manager_free(Manager *m);
+Manager* manager_free(Manager *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);