Blame SOURCES/0023-merge-into-clang-more-Memory-leaks.patch

9e5f05
From 432f843ffbc0bc0b14c0501b26a10e450c5b5fcc Mon Sep 17 00:00:00 2001
9e5f05
From: Rob Crittenden <rcritten@redhat.com>
9e5f05
Date: Mon, 8 Oct 2018 15:43:02 -0400
9e5f05
Subject: [PATCH 23/25] merge into clang: more Memory leaks
9e5f05
9e5f05
---
9e5f05
 src/getcert.c  | 2 +-
9e5f05
 src/submit-x.c | 2 +-
9e5f05
 2 files changed, 2 insertions(+), 2 deletions(-)
9e5f05
9e5f05
diff --git a/src/getcert.c b/src/getcert.c
9e5f05
index bbc45479..4713dd15 100644
9e5f05
--- a/src/getcert.c
9e5f05
+++ b/src/getcert.c
9e5f05
@@ -4040,7 +4040,7 @@ thumbprint(const char *s, SECOidTag tag, int bits)
9e5f05
 	if (length == 0) {
9e5f05
 		goto done;
9e5f05
 	}
9e5f05
-	u = malloc(length);
9e5f05
+	u = malloc(length+1);
9e5f05
 	if (u == NULL) {
9e5f05
 		free(t);
9e5f05
 		goto done;
9e5f05
diff --git a/src/submit-x.c b/src/submit-x.c
9e5f05
index 58d007ef..467e67e4 100644
9e5f05
--- a/src/submit-x.c
9e5f05
+++ b/src/submit-x.c
9e5f05
@@ -43,7 +43,7 @@
9e5f05
 static char *
9e5f05
 get_error_message(krb5_context ctx, krb5_error_code kcode)
9e5f05
 {
9e5f05
-	const char *ret;
9e5f05
+	char *ret;
9e5f05
 #ifdef HAVE_KRB5_GET_ERROR_MESSAGE
9e5f05
 	if (ctx) {
9e5f05
 		const char *msg = krb5_get_error_message(ctx, kcode);
9e5f05
-- 
9e5f05
2.21.0
9e5f05