* Mon Jan 31 2022 Klaus Wenninger <kwenning@redhat.com> - 1.5.1-2
- Having de-allocation in the reverse order compared to allocation seems to make gcc-12 static analysis of dynamic-memory-management happy.
This commit is contained in:
parent
ac810a80ab
commit
5e9ffffc07
@ -0,0 +1,31 @@
|
||||
From 2e0890980c6e8c49f681b855c4cfe9443529d7a2 Mon Sep 17 00:00:00 2001
|
||||
From: Klaus Wenninger <klaus.wenninger@aon.at>
|
||||
Date: Sun, 30 Jan 2022 17:25:18 +0100
|
||||
Subject: [PATCH] Refactor: sbd-md: alloc/de-alloc reverse order in slot_list
|
||||
|
||||
Having de-allocation in the reverse order compared to
|
||||
allocation seems to make gcc-12 static analysis of
|
||||
dynamic-memory-management happy.
|
||||
---
|
||||
src/sbd-md.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/sbd-md.c b/src/sbd-md.c
|
||||
index 47cbe8c..7a37522 100644
|
||||
--- a/src/sbd-md.c
|
||||
+++ b/src/sbd-md.c
|
||||
@@ -593,9 +593,9 @@ slot_list(struct sbd_context *st)
|
||||
}
|
||||
}
|
||||
|
||||
-out: free(s_node);
|
||||
+out: free(s_mbox);
|
||||
+ free(s_node);
|
||||
free(s_header);
|
||||
- free(s_mbox);
|
||||
return rc;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
10
sbd.spec
10
sbd.spec
@ -19,7 +19,7 @@
|
||||
%global shortcommit %(echo %{longcommit}|cut -c1-8)
|
||||
%global modified %(echo %{longcommit}-|cut -f2 -d-)
|
||||
%global github_owner Clusterlabs
|
||||
%global buildnum 1
|
||||
%global buildnum 2
|
||||
|
||||
%ifarch s390x s390
|
||||
# minimum timeout on LPAR diag288 watchdog is 15s
|
||||
@ -49,9 +49,10 @@ Name: sbd
|
||||
Summary: Storage-based death
|
||||
License: GPLv2+
|
||||
Version: 1.5.1
|
||||
Release: %{buildnum}%{?dist}.1
|
||||
Release: %{buildnum}%{?dist}
|
||||
Url: https://github.com/%{github_owner}/%{name}
|
||||
Source0: https://github.com/%{github_owner}/%{name}/archive/%{longcommit}/%{name}-%{longcommit}.tar.gz
|
||||
Patch0: 0001-Refactor-sbd-md-alloc-de-alloc-reverse-order-in-slot.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libuuid-devel
|
||||
@ -176,6 +177,11 @@ fi
|
||||
%{_libdir}/libsbdtestbed*
|
||||
|
||||
%changelog
|
||||
* Mon Jan 31 2022 Klaus Wenninger <kwenning@redhat.com> - 1.5.1-2
|
||||
- Having de-allocation in the reverse order compared to
|
||||
allocation seems to make gcc-12 static analysis of
|
||||
dynamic-memory-management happy.
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user