show-status: use free_and_replace() where we can

This commit is contained in:
Lennart Poettering
2018-11-23 17:19:24 +01:00
parent a885727a64
commit ccfc08d4bc

View File

@@ -73,10 +73,8 @@ int status_vprintf(const char *status, ShowStatusFlags flags, const char *format
emax = 3;
e = ellipsize(s, emax, 50);
if (e) {
free(s);
s = e;
}
if (e)
free_and_replace(s, e);
}
if (prev_ephemeral)