Merge "Fix defect that is detected by static analysis tool" into tizen accepted/tizen/unified/20220922.114004
authorWonnam Jang <wn.jang@samsung.com>
Wed, 21 Sep 2022 10:53:29 +0000 (10:53 +0000)
committerGerrit Code Review <gerrit@review>
Wed, 21 Sep 2022 10:53:29 +0000 (10:53 +0000)
tests/src/tts_unittests.cpp

index f49e97e..fe20c80 100644 (file)
@@ -186,6 +186,10 @@ static void __get_test_PCM_Data()
        }
 
        char* data = (char*)calloc(sizeof(char), size);
+       if (NULL == data) {
+               fclose(fp_in);
+               return;
+       }
        size_t read_size = fread(data, sizeof(char), size, fp_in);
        fclose(fp_in);