[systemd-commits] src/analyze
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Thu Sep 11 14:45:42 PDT 2014
src/analyze/analyze.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit d725a138c5c311ba06567d6841933aa5b7b6a435
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Thu Sep 11 23:41:44 2014 +0200
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
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index d860a02..1281d6b 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -277,7 +277,8 @@ static int acquire_time_data(sd_bus *bus, struct unit_times **out) {
return c;
fail:
- free_unit_times(unit_times, (unsigned) c);
+ if (unit_times)
+ free_unit_times(unit_times, (unsigned) c);
return r;
}
More information about the systemd-commits
mailing list