libX11/0001-Plug-a-memory-leak.patch
2017-01-05 20:53:51 +10:00

37 lines
1.0 KiB
Diff

From 20a3f99eba5001925b8b313da3accb7900eb1927 Mon Sep 17 00:00:00 2001
From: Emilio Pozuelo Monfort <pochu@debian.org>
Date: Tue, 25 Oct 2016 21:30:15 +0200
Subject: [PATCH libX11] Plug a memory leak
This was introduced in 8ea762f.
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
src/FontNames.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/FontNames.c b/src/FontNames.c
index e55f338..3e23b5f 100644
--- a/src/FontNames.c
+++ b/src/FontNames.c
@@ -98,12 +98,14 @@ int *actualCount) /* RETURN */
*ch = '\0'; /* and replace with null-termination */
count++;
} else {
+ Xfree(ch);
Xfree(flist);
flist = NULL;
count = 0;
break;
}
} else {
+ Xfree(ch);
Xfree(flist);
flist = NULL;
count = 0;
--
2.9.3