summaryrefslogtreecommitdiff
path: root/src/locale/test-keymap-util.c
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2016-06-19 15:02:51 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2016-06-19 15:04:52 +0000
commitb774852ae6442eb50ca6e098d19d486cbcc82a12 (patch)
treee1110d1a764d6ad4fd50a5a7ee9650d08950f08d /src/locale/test-keymap-util.c
parent222953e87f34545a3f9c6d3c18216e222bf6ea94 (diff)
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==
Diffstat (limited to 'src/locale/test-keymap-util.c')
-rw-r--r--src/locale/test-keymap-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/test-keymap-util.c b/src/locale/test-keymap-util.c
index 7e2c9e505a..2adda3da2b 100644
--- a/src/locale/test-keymap-util.c
+++ b/src/locale/test-keymap-util.c
@@ -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) {