diff options
Diffstat (limited to 'xorg-server/hw/xfree86/parser/Input.c')
-rw-r--r-- | xorg-server/hw/xfree86/parser/Input.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c index 8adbee9ae..739e49ba4 100644 --- a/xorg-server/hw/xfree86/parser/Input.c +++ b/xorg-server/hw/xfree86/parser/Input.c @@ -59,6 +59,7 @@ #include <xorg-config.h>
#endif
+#include "os.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
#include "Configint.h"
@@ -102,8 +103,10 @@ xf86parseInputSection (void) case DRIVER:
if (xf86getSubToken (&(ptr->inp_comment)) != STRING)
Error (QUOTE_MSG, "Driver");
- if (strcmp(val.str, "keyboard") == 0)
- ptr->inp_driver = "kbd";
+ if (strcmp(val.str, "keyboard") == 0) {
+ ptr->inp_driver = strdup("kbd");
+ free(val.str);
+ }
else
ptr->inp_driver = val.str;
break;
|