summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-09 11:06:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-09 11:11:04 +1000
commiteb50f8023e9ce11c3f0249ef9ddf398a1d983c84 (patch)
treeba3f2fd6708d98a0bf44162ffbf7ebc079af99a4 /src
parent7cc0ebf0858ebb505d933839f25bb269a8cdb764 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/synaptics.c3
1 files changed, 3 insertions, 0 deletions
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