[PATCH] input: free the EQ allocated memory on shutdown (#38634)

Jeremy Huddleston jeremyhu at apple.com
Mon Jun 27 10:30:09 PDT 2011


On Jun 26, 2011, at 11:02 PM, Peter Hutterer wrote:

> On Sun, Jun 26, 2011 at 06:13:42PM -0700, Jeremy Huddleston wrote:
>> You should add that to XQuartz's CloseInput in darwinXinput.c rather than adding a duplicate symbol in darwin.c
>> 
>> Assuming you do that,
>> Acked-by: Jeremy Huddleston <jeremyhu at apple.com>
> 
> Obviously xquartz is your area but if you abstract the EQ creation wouldn't
> it be better for symmetry to have EQ destruction handled in the same manner?
> otherwise you have CloseInput finalizing something that wasn't even
> initialized in the same file.

Yes, the EQ changes should be in darwinEvents.c, which is where you added DarwinEQFini to compliment DarwinEQInit.

I'm worried about CloseInput exising in both darwinXinput.c and now darwin.c.  Just squash this into your patch and it'll be fine:

diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c
index 3ef34fe..94c31bb 100644
--- a/hw/xquartz/darwinXinput.c
+++ b/hw/xquartz/darwinXinput.c
@@ -149,8 +149,3 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
   DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
 }
 
-void
-CloseInput (void)
-{
-}
-



More information about the xorg-devel mailing list