diff --git a/3rdparty/hts_engine_API/lib/HTS_misc.c b/3rdparty/hts_engine_API/lib/HTS_misc.c index 6a350fce2..d4ff2d4e3 100755 --- a/3rdparty/hts_engine_API/lib/HTS_misc.c +++ b/3rdparty/hts_engine_API/lib/HTS_misc.c @@ -565,12 +565,11 @@ void *HTS_calloc(const size_t num, const size_t size) #else mem = (void *) malloc(n); #endif /* FESTIVAL */ + if (mem == NULL) { + HTS_error(1, "HTS_calloc: Cannot allocate memory.\n"); + } memset(mem, 0, n); - - if (mem == NULL) - HTS_error(1, "HTS_calloc: Cannot allocate memory.\n"); - return mem; }