Fix for an unnecessary free() which can cause core dump.

https://pagure.io/certmonger/issue/163
This commit is contained in:
Rob Crittenden 2020-07-01 13:22:37 -04:00
parent 9e169141d1
commit 772d7bd87c
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From c5270bde4dab84f18c347e82376ef00733865247 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcritten@redhat.com>
Date: Wed, 1 Jul 2020 10:46:50 -0400
Subject: [PATCH] Don't free soptions while it is still needed
Introduced in fbcf03dd44007a9b231e9396cc418a00e1a4b49a trying
to avoid leaking soptions and aoptions.
https://pagure.io/certmonger/issue/163
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
---
src/dogtag.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/dogtag.c b/src/dogtag.c
index 91c9c588..faf81f97 100644
--- a/src/dogtag.c
+++ b/src/dogtag.c
@@ -579,7 +579,6 @@ main(int argc, const char **argv)
pin = NULL;
}
}
- free(soptions);
/* Add client creds. */
if (uid != NULL) {
uid = cm_submit_u_url_encode(uid);
--
2.25.4

View File

@ -26,7 +26,7 @@
Name: certmonger
Version: 0.79.11
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Certificate status monitor and PKI enrollment client
License: GPLv3+
@ -34,6 +34,8 @@ URL: http://pagure.io/certmonger/
Source0: http://releases.pagure.org/certmonger/certmonger-%{version}.tar.gz
#Source1: http://releases.pagure.org/certmonger/certmonger-%%{version}.tar.gz.sig
Patch0001: 0001-Don-t-free-soptions-while-it-is-still-needed.patch
BuildRequires: autoconf
BuildRequires: automake
@ -244,6 +246,9 @@ exit 0
%endif
%changelog
* Tue Jun 30 2020 Rob Crittenden <rcritten@redhat.com> - 0.79.11-2
- Fix for an unnecessary free() which can cause core dump.
* Tue Jun 30 2020 Rob Crittenden <rcritten@redhat.com> - 0.79.11-1
- Update to upstream 0.79.11