tests: fix memory leak in test-keymap-util

Fixes:
==27917== 3 bytes in 1 blocks are definitely lost in loss record 1 of 1
==27917==    at 0x4C28BF6: malloc (vg_replace_malloc.c:299)
==27917==    by 0x55083D9: strdup (in /usr/lib64/libc-2.22.so)
==27917==    by 0x1140DA: find_converted_keymap (keymap-util.c:524)
==27917==    by 0x110844: test_find_converted_keymap (test-keymap-util.c:52)
==27917==    by 0x1124FE: main (test-keymap-util.c:213)
==27917==
This commit is contained in:
Evgeny Vereshchagin
2016-06-19 15:04:52 +00:00
parent 222953e87f
commit b774852ae6
+2 -2
View File
@@ -58,8 +58,8 @@ static void test_find_converted_keymap(void) {
assert_se(r == 1);
assert_se(streq(ans, "pl"));
assert_se(find_converted_keymap("pl", "dvorak", &ans) == 1);
assert_se(streq(ans, "pl-dvorak"));
assert_se(find_converted_keymap("pl", "dvorak", &ans2) == 1);
assert_se(streq(ans2, "pl-dvorak"));
}
static void test_find_legacy_keymap(void) {