From c78e1cfcb5688059290141ce586d1298bb3f589a Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 1 Sep 2015 07:02:30 -0400 Subject: [PATCH] util: Avoid Coverity FORWARD_NULL Coverity claims it could be possible to call virDBusTypeStackFree with *stack == NULL and although the two API's that call it don't appear to allow that - I suppose it's better to be safe than sorry --- src/util/virdbus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index 1cf1eef39a..78fb7953dc 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -544,6 +544,10 @@ static void virDBusTypeStackFree(virDBusTypeStack **stack, size_t *nstack) { size_t i; + + if (!*stack) + return; + /* The iter in the first level of the stack is the * root iter which must not be freed */ -- GitLab