glx: do not leak the dri2 extension information
The XExtensionInfo is allocated dynamically (if the pointer is NULL) in the XEXT_GENERATE_FIND_DISPLAY macro. On the other hand the macro XEXT_GENERATE_CLOSE_DISPLAY does not check/free the memory. Follow the example set by dri1 and appledri, and use a static variable. Spotted while hunting "still reachable" leaks in Waffle. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
+2
-1
@@ -53,7 +53,8 @@
|
||||
|
||||
|
||||
static char dri2ExtensionName[] = DRI2_NAME;
|
||||
static XExtensionInfo *dri2Info;
|
||||
static XExtensionInfo _dri2Info_data;
|
||||
static XExtensionInfo *dri2Info = &_dri2Info_data;
|
||||
static XEXT_GENERATE_CLOSE_DISPLAY (DRI2CloseDisplay, dri2Info)
|
||||
|
||||
static Bool
|
||||
|
||||
Reference in New Issue
Block a user