33 lines
878 B
Diff
33 lines
878 B
Diff
|
From 6d93701f394693fc6f544647e3d491e19024188f Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
||
|
Date: Wed, 14 Jul 2021 20:13:40 +0200
|
||
|
Subject: [PATCH] secilc: fix memory leaks in secilc2conf
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
When specifying -o more than once, the previous allocation leaks.
|
||
|
|
||
|
Found by scan-build.
|
||
|
|
||
|
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
|
||
|
---
|
||
|
secilc/secil2conf.c | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/secilc/secil2conf.c b/secilc/secil2conf.c
|
||
|
index d4103777a439..c49522e5684c 100644
|
||
|
--- a/secilc/secil2conf.c
|
||
|
+++ b/secilc/secil2conf.c
|
||
|
@@ -111,6 +111,7 @@ int main(int argc, char *argv[])
|
||
|
qualified_names = 1;
|
||
|
break;
|
||
|
case 'o':
|
||
|
+ free(output);
|
||
|
output = strdup(optarg);
|
||
|
break;
|
||
|
case 'h':
|
||
|
--
|
||
|
2.32.0
|
||
|
|