From eb50f8023e9ce11c3f0249ef9ddf398a1d983c84 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 9 May 2013 11:06:12 +1000 Subject: Plug memory leak for option_string xf86SetStrOption() returns a strdup'd string that must be freed after use. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie --- src/synaptics.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/synaptics.c b/src/synaptics.c index 2de05d4..d4b21a9 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -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 -- cgit v1.2.3