[PATCH evdev 2/2] Release leaked device identifier on input device disconnect.
Peter Hutterer
peter.hutterer at who-t.net
Sun Mar 6 16:25:18 PST 2011
On Fri, Mar 04, 2011 at 01:18:54PM +0200, Rami Ylimäki wrote:
> Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
> Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
> ---
> src/evdev.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index a77be9e..165400f 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -1839,6 +1839,9 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
> free(pEvdev->rmlvo.variant);
> free(pEvdev->rmlvo.options);
> memset(&pEvdev->rmlvo, 0, sizeof(pEvdev->rmlvo));
> + /* Release string allocated in EvdevOpenDevice. */
> + free((void *)pEvdev->device); /* (const char *) */
that void typecast to free a const char* worries me a bit. if it's not
const enough, we shouldn't declare it as such.
Cheers,
Peter
> + pEvdev->device = NULL;
> }
> xf86DeleteInput(pInfo, flags);
> }
> --
> 1.6.3.3
>
More information about the xorg-devel
mailing list