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>
This commit is contained in:
Julien Cristau 2010-06-24 18:45:10 +01:00 committed by Keith Packard
parent 390a8466dd
commit e6531ae9d5

View File

@ -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;
}