aboutsummaryrefslogtreecommitdiffstats
path: root/android/charmap.c
diff options
context:
space:
mode:
authorvchtchetkine <vchtchetkine@google.com>2009-09-25 13:30:53 -0700
committervchtchetkine <vchtchetkine@google.com>2009-09-25 13:30:53 -0700
commit2697a83bcf2b1d13c5f957e4c5ee64b774099b3f (patch)
tree21718b00b6e570193075cac23f04cc182ec7a764 /android/charmap.c
parentc3e6bb48bc36d7e1b95bff7c870b0842eb8a452e (diff)
downloadexternal_qemu-2697a83bcf2b1d13c5f957e4c5ee64b774099b3f.zip
external_qemu-2697a83bcf2b1d13c5f957e4c5ee64b774099b3f.tar.gz
external_qemu-2697a83bcf2b1d13c5f957e4c5ee64b774099b3f.tar.bz2
Fix free() bug in charmap code
Diffstat (limited to 'android/charmap.c')
-rw-r--r--android/charmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/charmap.c b/android/charmap.c
index a313312..08c0901 100644
--- a/android/charmap.c
+++ b/android/charmap.c
@@ -721,6 +721,15 @@ android_charmap_setup(const char* kcm_file_path) {
void
android_charmap_done(void) {
if (NULL != android_charmaps) {
+ int n;
+ for (n = 0; n < android_charmap_count; n++) {
+ // Entries for qwerty and qwerty2 character maps are
+ // static entries defined in charmap.c
+ if ((_qwerty_charmap.entries != android_charmaps[n]->entries) &&
+ (_qwerty2_charmap.entries != android_charmaps[n]->entries)) {
+ qemu_free((void*)android_charmaps[n]->entries);
+ }
+ }
qemu_free(android_charmaps);
}
}