Blame SOURCES/0001-Fix-a-use-after-free.patch

36e7b1
From 3b548b74aeaefb41ac9eca1f2e82ae693b469345 Mon Sep 17 00:00:00 2001
36e7b1
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
36e7b1
Date: Thu, 3 May 2018 17:28:52 +0200
36e7b1
Subject: [PATCH] Fix a use after free()
36e7b1
MIME-Version: 1.0
36e7b1
Content-Type: text/plain; charset=UTF-8
36e7b1
Content-Transfer-Encoding: 8bit
36e7b1
36e7b1
The issue was reported by Coverity Scan.
36e7b1
36e7b1
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
36e7b1
---
36e7b1
 prog/sensors/chips.c | 4 ++--
36e7b1
 1 file changed, 2 insertions(+), 2 deletions(-)
36e7b1
36e7b1
diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c
36e7b1
index 668f508f..01c08fa8 100644
36e7b1
--- a/prog/sensors/chips.c
36e7b1
+++ b/prog/sensors/chips.c
36e7b1
@@ -48,7 +48,6 @@ void print_chip_raw(const sensors_chip_name *name)
36e7b1
 			continue;
36e7b1
 		}
36e7b1
 		printf("%s:\n", label);
36e7b1
-		free(label);
36e7b1
 
36e7b1
 		b = 0;
36e7b1
 		while ((sub = sensors_get_all_subfeatures(name, feature, &b))) {
36e7b1
@@ -64,6 +63,7 @@ void print_chip_raw(const sensors_chip_name *name)
36e7b1
 			} else
36e7b1
 				printf("(%s)\n", label);
36e7b1
 		}
36e7b1
+		free(label);
36e7b1
 	}
36e7b1
 }
36e7b1
 
36e7b1
-- 
36e7b1
2.14.3
36e7b1