mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
show-status: use free_and_replace() where we can
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user