diff options
Diffstat (limited to 'tools/validatekeymaps')
-rw-r--r-- | tools/validatekeymaps/Main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp index 3cc2467..563225e 100644 --- a/tools/validatekeymaps/Main.cpp +++ b/tools/validatekeymaps/Main.cpp @@ -78,7 +78,7 @@ static bool validateFile(const char* filename) { return false; case FILETYPE_KEYLAYOUT: { - KeyLayoutMap* map; + sp<KeyLayoutMap> map; status_t status = KeyLayoutMap::load(String8(filename), &map); if (status) { fprintf(stderr, "Error %d parsing key layout file.\n\n", status); @@ -88,7 +88,7 @@ static bool validateFile(const char* filename) { } case FILETYPE_KEYCHARACTERMAP: { - KeyCharacterMap* map; + sp<KeyCharacterMap> map; status_t status = KeyCharacterMap::load(String8(filename), &map); if (status) { fprintf(stderr, "Error %d parsing key character map file.\n\n", status); @@ -104,6 +104,7 @@ static bool validateFile(const char* filename) { fprintf(stderr, "Error %d parsing input device configuration file.\n\n", status); return false; } + delete map; break; } @@ -114,6 +115,7 @@ static bool validateFile(const char* filename) { fprintf(stderr, "Error %d parsing virtual key definition file.\n\n", status); return false; } + delete map; break; } } |