diff options
Diffstat (limited to 'apps/core_keymap.c')
-rw-r--r-- | apps/core_keymap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/core_keymap.c b/apps/core_keymap.c index 966f32057a..89e7913c33 100644 --- a/apps/core_keymap.c +++ b/apps/core_keymap.c | |||
@@ -80,11 +80,12 @@ int core_load_key_remap(const char *filename) | |||
80 | int handle = core_alloc(bufsize); | 80 | int handle = core_alloc(bufsize); |
81 | if (handle > 0) | 81 | if (handle > 0) |
82 | { | 82 | { |
83 | core_pin(handle); | 83 | void *data = core_get_data_pinned(handle); |
84 | if (read(fd, core_get_data(handle), bufsize) == (ssize_t)bufsize) | 84 | |
85 | if (read(fd, data, bufsize) == (ssize_t)bufsize) | ||
85 | count = action_set_keymap_handle(handle, count); | 86 | count = action_set_keymap_handle(handle, count); |
86 | 87 | ||
87 | core_unpin(handle); | 88 | core_put_data_pinned(data); |
88 | } | 89 | } |
89 | 90 | ||
90 | close(fd); | 91 | close(fd); |