diff options
Diffstat (limited to 'src/timedate/timedated.c')
-rw-r--r-- | src/timedate/timedated.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 1061b094d3..a55a929a49 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ /*** This file is part of systemd. @@ -74,9 +75,7 @@ static int context_read_data(Context *c) { else if (r < 0) log_warning_errno(r, "Failed to get target of /etc/localtime: %m"); - free(c->zone); - c->zone = t; - t = NULL; + free_and_replace(c->zone, t); c->local_rtc = clock_is_localtime(NULL) > 0; |