summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-09-04 17:04:13 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-09-05 10:51:43 +1000
commitcb14924a2a5be21c8525ca70932ab8b5f0f99752 (patch)
tree6274f3c8ddca8910c8cb625d00b9a7846c9dd714
parent39c4c7fca7db19ac550332fa53d0d4f58a26f67f (diff)
downloadxf86-input-wacom-cb14924a2a5be21c8525ca70932ab8b5f0f99752.tar.gz
strdup the option key/values in our input_option_new
This is a interface for servers with ABI < 14 (up to server 1.11). The server version of it strdups the values, so we must do the same. Otherwise the values assigned to the InputOption list in wcmOptionDupConvert are freed during xf86OptionListFree(). That later causes a SIGABORT when NewInputDeviceRequest starts using those options. https://sourceforge.net/p/linuxwacom/bugs/233/ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pinglinux@gmail.com>
-rw-r--r--src/wcmValidateDevice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 65c6168..b3c9c61 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -345,8 +345,8 @@ input_option_new(InputOption *list, char *key, char *value)
InputOption *new;
new = calloc(1, sizeof(InputOption));
- new->key = key;
- new->value = value;
+ new->key = strdup(key);
+ new->value = strdup(value);
new->next = list;
return new;
}