systemd/0643-openssl-util-avoid-freeing-invalid-pointer.patch
Jan Macku e5f65c3fc6 systemd-252-27
Resolves: RHEL-1086,RHEL-11591,RHEL-16182,RHEL-19483,RHEL-7026
2024-02-15 09:36:23 +01:00

26 lines
795 B
Diff

From fce4697dd99e7650d39559fabb35032a6adbd78e Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 12 Dec 2023 15:47:33 +0100
Subject: [PATCH] openssl-util: avoid freeing invalid pointer
(cherry picked from commit 38e1035befef69870735e7237eb0d3c0e8a007dd)
Related: RHEL-16182
---
src/shared/openssl-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/openssl-util.c b/src/shared/openssl-util.c
index d863729708..8788c12a22 100644
--- a/src/shared/openssl-util.c
+++ b/src/shared/openssl-util.c
@@ -1066,7 +1066,7 @@ int string_hashsum(
_cleanup_free_ void *hash = NULL;
size_t hash_size;
- _cleanup_free_ char *enc;
+ _cleanup_free_ char *enc = NULL;
int r;
assert(s || len == 0);