summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-06-24 18:45:10 +0100
committerKeith Packard <keithp@keithp.com>2010-06-30 12:20:25 -0400
commite6531ae9d5bdd37775e921268366fb76056e22d5 (patch)
treee5526c2bd41670f75092318dcd3aa3f884b81807 /hw
parent390a8466dd1914f4786b811ff8454f6e0c4b6b04 (diff)
Xephyr: fix memory leak in XF86DRIOpenConnection
The allocated bus id string was not being freed. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 4041bf5fa..ce584b051 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -682,7 +682,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client)
{
xXF86DRIOpenConnectionReply rep;
drm_handle_t hSAREA;
- char* busIdString;
+ char* busIdString = NULL;
REQUEST(xXF86DRIOpenConnectionReq);
REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq);
@@ -716,6 +716,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client)
WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep);
if (rep.busIdStringLength)
WriteToClient(client, rep.busIdStringLength, busIdString);
+ free(busIdString);
EPHYR_LOG ("leave\n") ;
return Success;
}