mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
analyze: avoid a null dereference
If we have an error in the early sd_bus_* calls then unit_times will still be null. Found with coverity. Fixes: CID#996464
This commit is contained in:
parent
6711741365
commit
d725a138c5
Notes:
Lennart Poettering
2014-10-24 18:15:31 +02:00
Backport: bugfix
@ -277,6 +277,7 @@ static int acquire_time_data(sd_bus *bus, struct unit_times **out) {
|
||||
return c;
|
||||
|
||||
fail:
|
||||
if (unit_times)
|
||||
free_unit_times(unit_times, (unsigned) c);
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user