!57 [sync] PR-53: sync some patches from upstream
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
a0250d34cb
32
backport-rename_device-free-path-after-it-is-used.patch
Normal file
32
backport-rename_device-free-path-after-it-is-used.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 2b185d6bb1eda7e5bdd885afc88bf404d2c1f861 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Fri, 1 Mar 2024 14:36:45 +0100
|
||||
Subject: [PATCH] rename_device: free path after it is used
|
||||
|
||||
Conflict: NA
|
||||
Reference: https://github.com/fedora-sysv/initscripts/commit/2b185d6bb1eda7e5bdd885afc88bf404d2c1f861
|
||||
---
|
||||
src/rename_device.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/rename_device.c b/src/rename_device.c
|
||||
index 0d29f64d..e6b09f45 100644
|
||||
--- a/src/rename_device.c
|
||||
+++ b/src/rename_device.c
|
||||
@@ -180,7 +180,7 @@ struct netdev *get_configs() {
|
||||
return ret;
|
||||
}
|
||||
for (x = 0; x < ncfgs; x++ ) {
|
||||
- char *path;
|
||||
+ char *path = NULL;
|
||||
char *devname, *hwaddr;
|
||||
int vlan;
|
||||
gchar *contents, **lines;
|
||||
@@ -193,6 +193,7 @@ struct netdev *get_configs() {
|
||||
cfgs[x]->d_name) == -1)
|
||||
continue;
|
||||
g_file_get_contents(path, &contents, NULL, NULL);
|
||||
+ free(path);
|
||||
if (!contents)
|
||||
continue;
|
||||
lines = g_strsplit(contents,"\n", 0);
|
||||
@ -20,7 +20,7 @@ Requires: gawk \
|
||||
Name: initscripts
|
||||
Summary: Basic support for legacy System V init scripts
|
||||
Version: 10.19
|
||||
Release: 1
|
||||
Release: 2
|
||||
|
||||
License: GPL-2.0-only
|
||||
|
||||
@ -81,6 +81,7 @@ Obsoletes: %{name} < 9.82-2
|
||||
|
||||
# Patches to be removed -- deprecated functionality which shall be removed at
|
||||
# --------------------- some point in the future:
|
||||
Patch0: backport-rename_device-free-path-after-it-is-used.patch
|
||||
|
||||
|
||||
Patch9000: bugfix-initscripts-add-udev-wait-dependency-for-network.patch
|
||||
@ -386,6 +387,12 @@ fi
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Thu Feb 13 2025 xinghe <xinghe2@h-partners.com> - 10.19-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:rename_device: free path after it is used
|
||||
|
||||
* Thu Feb 1 2024 liubo <liubo335@huawei.com> - 10.19-1
|
||||
- Type: requirement
|
||||
- ID: NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user