30 lines
810 B
Diff
30 lines
810 B
Diff
|
|
From f4d987f82e64fd53ae5646d39b5174fb3cc572d2 Mon Sep 17 00:00:00 2001
|
||
|
|
From: liuchao173 <liuchao173@huawei.com>
|
||
|
|
Date: Fri, 29 Dec 2023 10:30:44 +0800
|
||
|
|
Subject: [PATCH] activate_mapping: set errsave before first jump to the error
|
||
|
|
label
|
||
|
|
|
||
|
|
if the fopen fails, errsave is used uninitialized
|
||
|
|
|
||
|
|
Reference: https://github.com/Irqbalance/irqbalance/commit/f4d987f82e64fd53ae5646d39b5174fb3cc572d2
|
||
|
|
Conflict: NA
|
||
|
|
---
|
||
|
|
activate.c | 1 +
|
||
|
|
1 file changed, 1 insertion(+)
|
||
|
|
|
||
|
|
diff --git a/activate.c b/activate.c
|
||
|
|
index 4830f34..b08d4b0 100644
|
||
|
|
--- a/activate.c
|
||
|
|
+++ b/activate.c
|
||
|
|
@@ -73,6 +73,7 @@ static void activate_mapping(struct irq_info *info, void *data __attribute__((un
|
||
|
|
|
||
|
|
sprintf(buf, "/proc/irq/%i/smp_affinity", info->irq);
|
||
|
|
file = fopen(buf, "w");
|
||
|
|
+ errsave = errno;
|
||
|
|
if (!file)
|
||
|
|
goto error;
|
||
|
|
|
||
|
|
--
|
||
|
|
2.28.0.windows.1
|
||
|
|
|