1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00

logind: use free_and_replace() where that makes sense

This commit is contained in:
Lennart Poettering 2019-07-23 10:25:03 +02:00
parent 11b0dd0e30
commit 09f300c4d0

View File

@ -245,8 +245,7 @@ int inhibitor_load(Inhibitor *i) {
if (r < 0)
return log_oom();
free(i->who);
i->who = cc;
free_and_replace(i->who, cc);
}
if (why) {
@ -254,8 +253,7 @@ int inhibitor_load(Inhibitor *i) {
if (r < 0)
return log_oom();
free(i->why);
i->why = cc;
free_and_replace(i->why, cc);
}
if (i->fifo_path) {