[PATCH libxtrans 1/3] Set freeXLOCAL to NULL after freeing it to prevent double frees
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Nov 18 22:43:40 UTC 2018
We shouldn't be calling the LocalEndTransports routine twice, but
just make sure if we do, we don't call free twice on the same pointer.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
Xtranslcl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Xtranslcl.c b/Xtranslcl.c
index 07625e1..f21f606 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -1703,6 +1703,7 @@ TRANS(LocalEndTransports)(void)
{
prmsg(3,"LocalEndTransports()\n");
free(freeXLOCAL);
+ freeXLOCAL = NULL;
}
#define TYPEBUFSIZE 32
--
2.15.2
More information about the xorg-devel
mailing list