diff --git a/.gitignore b/.gitignore
index 008ed41..447ccca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/thermald-1.9.1.tar.gz
+SOURCES/thermald-2.4.1.tar.gz
diff --git a/.thermald.metadata b/.thermald.metadata
index 05e6627..66b77c8 100644
--- a/.thermald.metadata
+++ b/.thermald.metadata
@@ -1 +1 @@
-adeb21c0fbc69b083e76923a798d0550811217c3 SOURCES/thermald-1.9.1.tar.gz
+097a89cbebd1da546ef4af8ea106b9a69f0d712d SOURCES/thermald-2.4.1.tar.gz
diff --git a/SOURCES/0001-adaptive-Fix-missing-initializer.patch b/SOURCES/0001-adaptive-Fix-missing-initializer.patch
new file mode 100644
index 0000000..457332f
--- /dev/null
+++ b/SOURCES/0001-adaptive-Fix-missing-initializer.patch
@@ -0,0 +1,26 @@
+From d51e3d5f78ac0d90d3bf247f1fb61a53fa3b5a71 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <bberg@redhat.com>
+Date: Thu, 10 Dec 2020 11:35:46 +0100
+Subject: [PATCH 1/3] adaptive: Fix missing initializer
+
+The limit_1_valid attribute was not initialized to zero.
+---
+ src/thd_engine_adaptive.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
+index d84f1ca..4824a9d 100644
+--- a/src/thd_engine_adaptive.cpp
++++ b/src/thd_engine_adaptive.cpp
+@@ -497,6 +497,8 @@ int cthd_engine_adaptive::parse_ppcc(char *name, char *buf, int len) {
+ 	if (ppcc.power_limit_1_max && ppcc.power_limit_1_min && ppcc.time_wind_1_min
+ 			&& ppcc.time_wind_1_max && ppcc.step_1_size)
+ 		ppcc.limit_1_valid = 1;
++	else
++		ppcc.limit_1_valid = 0;
+ 
+ 	ppccs.push_back(ppcc);
+ 
+-- 
+2.26.2
+
diff --git a/SOURCES/0002-adaptive-Fix-use-after-free.patch b/SOURCES/0002-adaptive-Fix-use-after-free.patch
new file mode 100644
index 0000000..d76138d
--- /dev/null
+++ b/SOURCES/0002-adaptive-Fix-use-after-free.patch
@@ -0,0 +1,31 @@
+From a10d4ddeb8b55e238289d63a2623b8936eb6bda4 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <bberg@redhat.com>
+Date: Thu, 10 Dec 2020 11:36:43 +0100
+Subject: [PATCH 2/3] adaptive: Fix use-after-free
+
+The debug logging would access a recently free'ed variable. Fix this by
+changing the order.
+---
+ src/thd_engine_adaptive.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
+index 4824a9d..b68cc40 100644
+--- a/src/thd_engine_adaptive.cpp
++++ b/src/thd_engine_adaptive.cpp
+@@ -692,10 +692,11 @@ int cthd_engine_adaptive::parse_gddv_key(char *buf, int size, int *end_offset) {
+ 
+ 	str = strtok(key, "/");
+ 	if (!str) {
++		thd_log_debug("Ignoring key %s\n", key);
++
+ 		delete[] (key);
+ 		delete[] (val);
+ 
+-		thd_log_debug("Ignoring key %s\n", key);
+ 		/* Ignore */
+ 		return THD_SUCCESS;
+ 	}
+-- 
+2.26.2
+
diff --git a/SOURCES/0003-adaptive-Remove-useless-NULL-check.patch b/SOURCES/0003-adaptive-Remove-useless-NULL-check.patch
new file mode 100644
index 0000000..f186db9
--- /dev/null
+++ b/SOURCES/0003-adaptive-Remove-useless-NULL-check.patch
@@ -0,0 +1,27 @@
+From 268349088e0931421da65f4dce6997f197a10b12 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <bberg@redhat.com>
+Date: Thu, 10 Dec 2020 11:37:27 +0100
+Subject: [PATCH 3/3] adaptive: Remove useless NULL check
+
+_zone cannot be NULL in update_engine_state. Remove a useless check that
+would have caused a crash earlier already.
+---
+ src/thd_engine_adaptive.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
+index b68cc40..bc16ad2 100644
+--- a/src/thd_engine_adaptive.cpp
++++ b/src/thd_engine_adaptive.cpp
+@@ -1454,7 +1454,7 @@ void cthd_engine_adaptive::update_engine_state() {
+ 				_zone->zone_reset(1);
+ 				_zone->trip_delete_all();
+ 
+-				if (_zone && _zone->zone_active_status())
++				if (_zone->zone_active_status())
+ 					_zone->set_zone_inactive();
+ 			}
+ 
+-- 
+2.26.2
+
diff --git a/SPECS/thermald.spec b/SPECS/thermald.spec
index 88d1fc6..7f977f6 100644
--- a/SPECS/thermald.spec
+++ b/SPECS/thermald.spec
@@ -7,7 +7,7 @@
 
 
 Name:		thermald
-Version:	1.9.1
+Version:	2.4.1
 Release:	2%{?dist}
 Summary:	Thermal Management daemon
 
@@ -18,13 +18,16 @@ Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 # No cpuid.h on other arches.
 ExclusiveArch:	%{ix86} x86_64
 
-BuildRequires:	autoconf
+BuildRequires:	autoconf autoconf-archive
 BuildRequires:	automake
 BuildRequires:	dbus-glib-devel
 BuildRequires:	desktop-file-utils
 BuildRequires:	gcc-c++
 BuildRequires:	libxml2-devel
 BuildRequires:	systemd-devel
+BuildRequires:  upower-devel
+BuildRequires:  libevdev-devel
+BuildRequires:  gtk-doc
 
 Requires:	dbus%{?_isa}
 
@@ -33,6 +36,12 @@ Requires(pre):	shadow-utils
 
 %{?systemd_requires}
 
+# https://github.com/intel/thermal_daemon/pull/286
+Patch0001:	0001-adaptive-Fix-missing-initializer.patch
+Patch0002:	0002-adaptive-Fix-use-after-free.patch
+Patch0003:	0003-adaptive-Remove-useless-NULL-check.patch
+
+
 %description
 %{name} monitors and controls platform temperature.
 
@@ -143,7 +152,7 @@ of the "power" group.  So make sure to add your user id to this
 group before using the thermald-monitor-app.
 EOF
 
-%{_bindir}/autoreconf -fiv
+NO_CONFIGURE=1 ./autogen.sh
 
 
 %build
@@ -239,6 +248,14 @@ exit 0
 
 
 %changelog
+* Thu Dec 10 2020 Benjamin Berg <bberg@redhat.com> - 2.4.1-2
+- Fix problems reported by coverity
+  Related: #1875505
+
+* Tue Dec 08 2020 Benjamin Berg <bberg@redhat.com> - 2.4.1-1
+- Update to thermald 2.4.1
+  Resolves: #1875505
+
 * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild