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:
Peter Hutterer
2013-05-09 11:06:12 +10:00
parent 7cc0ebf085
commit eb50f8023e

View File

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