Blame SOURCES/0007-Check-whether-the-index-variable-is-valid-before-der.patch

ad2f2b
From 79e59e9d374e635ca65b4d24c59fffacc5425b1a Mon Sep 17 00:00:00 2001
ad2f2b
From: Tomas Popela <tpopela@redhat.com>
ad2f2b
Date: Mon, 23 Jul 2018 11:04:35 +0200
ad2f2b
Subject: [PATCH 07/17] Check whether the index variable is valid before
ad2f2b
 dereferencing it
ad2f2b
ad2f2b
yelp-3.28.1/libyelp/yelp-mallard-document.c:1002: deref_ptr: Directly dereferencing pointer "index".
ad2f2b
yelp-3.28.1/libyelp/yelp-mallard-document.c:1073: check_after_deref: Null-checking "index" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
ad2f2b
---
ad2f2b
 libyelp/yelp-mallard-document.c | 3 +--
ad2f2b
 1 file changed, 1 insertion(+), 2 deletions(-)
ad2f2b
ad2f2b
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
ad2f2b
index 74fc80ee..9c006efc 100644
ad2f2b
--- a/libyelp/yelp-mallard-document.c
ad2f2b
+++ b/libyelp/yelp-mallard-document.c
ad2f2b
@@ -1070,8 +1070,7 @@ mallard_index_threaded (YelpMallardDocument *mallard)
ad2f2b
                 xmlXPathFreeContext (xpath);
ad2f2b
             if (index->doc != NULL)
ad2f2b
                 xmlFreeDoc (index->doc);
ad2f2b
-            if (index != NULL)
ad2f2b
-                g_free (index);
ad2f2b
+            g_free (index);
ad2f2b
             if (parserCtxt != NULL)
ad2f2b
                 xmlFreeParserCtxt (parserCtxt);
ad2f2b
             g_object_unref (pagefile);
ad2f2b
-- 
ad2f2b
2.19.1
ad2f2b