File kbd-1.15.3-loadkeys.diff of Package kbd

Index: kbd-1.15.3/src/loadkeys.y
===================================================================
--- kbd-1.15.3.orig/src/loadkeys.y
+++ kbd-1.15.3/src/loadkeys.y
@@ -352,8 +352,6 @@ static int defkeys(int fd, int kbd_mode)
 							j, (key_map[i])[j]);
 				}
 			}
-			xfree(key_map[i]);
-			xfree(keymap_was_set[i]);
 
 		} else if (keymaps_line_seen && !defining[i]) {
 			/* deallocate keymap */
@@ -1116,7 +1114,7 @@ int main(int argc, char *argv[])
 
 	if (!optm && !optb) {
 		/* check whether the keyboard is in Unicode mode */
-		fd = getfd(console);
+		fd = getfd(NULL);
 
 		if (ioctl(fd, KDGKBMODE, &kbd_mode)) {
 			perror("KDGKBMODE");