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:
parent
11b0dd0e30
commit
09f300c4d0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user