From: Wonnam Jang Date: Fri, 18 Dec 2015 07:50:07 +0000 (+0900) Subject: fix SVACE issue due to handle leak X-Git-Tag: accepted/tizen/mobile/20151219.044018^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b55fd5b6d37828417be9c8c4bb5a4f176bf7bbd;hp=fb5084cfe1e2858cd04a0575051eb78bf7a729ad;p=platform%2Fcore%2Fuifw%2Ftts.git fix SVACE issue due to handle leak Change-Id: Ia9bb6b5cfd60b558bca726a08bf9f720115388b4 Signed-off-by: Wonnam Jang --- diff --git a/test/test_main.c b/test/test_main.c index 944f2f6..c39a146 100644 --- a/test/test_main.c +++ b/test/test_main.c @@ -55,7 +55,8 @@ static bool __tts_test_get_text_from_file(const char* path, char** text) *text = (char*)calloc(1, text_len+1); if (text == NULL) { - SLOG(LOG_ERROR, tts_tag(), "Fail to memory allocation\n"); + SLOG(LOG_ERROR, tts_tag(), "Fail to memory allocation\n"); + fclose(fp); return 0; } @@ -64,6 +65,7 @@ static bool __tts_test_get_text_from_file(const char* path, char** text) result_len = fread(*text, sizeof(char), text_len, fp); if (result_len != text_len) { SLOG(LOG_ERROR, tts_tag(), "Fail to read\n"); + fclose(fp); return 0; } }