X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=test%2Ftest_main.c;h=c39a1460dcf2ec77d55688db3f3c532c59c15f00;hb=1b55fd5b6d37828417be9c8c4bb5a4f176bf7bbd;hp=944f2f6f5b585fd417dcae6e44335d2fac9d49cf;hpb=fb5084cfe1e2858cd04a0575051eb78bf7a729ad;p=platform%2Fcore%2Fuifw%2Ftts.git 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; } }