journald: use free_and_replace() where appropriate

This commit is contained in:
Lennart Poettering 2019-11-22 14:09:35 +01:00
parent 659a77bec6
commit 99d0d05a10

View file

@ -741,8 +741,7 @@ static void server_cache_hostname(Server *s) {
if (!x)
return;
free(s->hostname_field);
s->hostname_field = x;
free_and_replace(s->hostname_field, x);
}
static bool shall_try_append_again(JournalFile *f, int r) {