Systemd/src/analyze
Filipe Brandenburger df560cf6b1 analyze: use _cleanup_ for struct unit_times
This introduces a has_data boolean field in struct unit_files which can
be used to detect the end of the array.

Use a _cleanup_ for struct unit_files in acquire_time_data and its
callers. Code for acquire_time_data is also simplified by replacing
goto's with straight returns.

Tested: By running the commands below, also checking them under valgrind.
  - build/systemd-analyze blame
  - build/systemd-analyze critical-chain
  - build/systemd-analyze plot

Fixes: Coverity finding CID 996464.
2018-06-08 15:46:07 +02:00
..
analyze-verify.c core: undo the dependency inversion between unit.h and all unit types 2018-05-15 14:24:34 -04:00
analyze-verify.h tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00
analyze.c analyze: use _cleanup_ for struct unit_times 2018-06-08 15:46:07 +02:00
meson.build tree-wide: drop license boilerplate 2018-04-06 18:58:55 +02:00