mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
Plug memory leak for option_string
xf86SetStrOption() returns a strdup'd string that must be freed after use. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -513,12 +513,15 @@ set_softbutton_areas_option(InputInfoPtr pInfo)
|
||||
memcpy(pars->softbutton_areas[0], values, 4 * sizeof(int));
|
||||
memcpy(pars->softbutton_areas[1], values + 4, 4 * sizeof(int));
|
||||
|
||||
free(option_string);
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
xf86IDrvMsg(pInfo, X_ERROR,
|
||||
"invalid SoftButtonAreas value '%s', keeping defaults\n",
|
||||
option_string);
|
||||
free(option_string);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user