Blame SOURCES/0025-Coverity-still-doesn-t-believe-in-error-codes.patch

80b73c
From c2223eb4638c6d8562626917651a11b8aa1e8f9e Mon Sep 17 00:00:00 2001
80b73c
From: Peter Jones <pjones@redhat.com>
80b73c
Date: Thu, 21 Jun 2018 16:18:32 -0400
80b73c
Subject: [PATCH] Coverity still doesn't believe in error codes...
80b73c
80b73c
So also test fbuf here.
80b73c
80b73c
Signed-off-by: Peter Jones <pjones@redhat.com>
80b73c
---
80b73c
 src/linux-acpi.c | 2 +-
80b73c
 1 file changed, 1 insertion(+), 1 deletion(-)
80b73c
80b73c
diff --git a/src/linux-acpi.c b/src/linux-acpi.c
80b73c
index 88f0084a37e..346eba09041 100644
80b73c
--- a/src/linux-acpi.c
80b73c
+++ b/src/linux-acpi.c
80b73c
@@ -49,7 +49,7 @@ parse_acpi_hid_uid(struct device *dev, const char *fmt, ...)
80b73c
                 return -1;
80b73c
 
80b73c
         rc = read_sysfs_file(&fbuf, "%s/firmware_node/path", path);
80b73c
-        if (rc > 0) {
80b73c
+        if (rc > 0 && fbuf) {
80b73c
                 size_t l = strlen(fbuf);
80b73c
                 if (l > 1) {
80b73c
                         fbuf[l-1] = 0;
80b73c
-- 
80b73c
2.17.1
80b73c