Update to latest git
This commit is contained in:
parent
0e1d85613a
commit
708deb95da
536 changed files with 65844 additions and 113 deletions
27
0233-analyze-avoid-a-null-dereference.patch
Normal file
27
0233-analyze-avoid-a-null-dereference.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From d725a138c5c311ba06567d6841933aa5b7b6a435 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
||||
Date: Thu, 11 Sep 2014 23:41:44 +0200
|
||||
Subject: [PATCH] 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
|
||||
---
|
||||
src/analyze/analyze.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
|
||||
index d860a022b7..1281d6b9ea 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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue