mcstrans/0002-mcstrans-Fix-USER_AFTER_FREE-problem.patch
Petr Lautrbach 51b0210f5f SELinux userspace 3.3-rc2 release
Resolves: rhbz#2003554
2021-09-30 18:29:34 +02:00

29 lines
748 B
Diff

From 7a170534163ab9d9159dddfadb996587d98fe30e Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <plautrba@redhat.com>
Date: Thu, 9 May 2019 16:44:43 +0200
Subject: [PATCH] mcstrans: Fix USER_AFTER_FREE problem
---
mcstrans/src/mcstrans.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mcstrans/src/mcstrans.c b/mcstrans/src/mcstrans.c
index d0690e6b0dca..8678418a1570 100644
--- a/mcstrans/src/mcstrans.c
+++ b/mcstrans/src/mcstrans.c
@@ -1664,10 +1664,8 @@ untrans_context(const char *incon, char **rcon) {
return -1;
}
}
- if (canonical) {
+ if (canonical)
free(canonical);
- free(raw);
- }
if (add_cache(domain, raw, range) < 0) {
free(range);
free(raw);
--
2.32.0