diff --git a/src/vdexExtractor.c b/src/vdexExtractor.c index 0c50c46..2224c9a 100644 --- a/src/vdexExtractor.c +++ b/src/vdexExtractor.c @@ -282,8 +282,10 @@ int main(int argc, char **argv) { mainRet = EXIT_SUCCESS; complete: - for (size_t i = 0; i < pFiles.fileCnt; i++) { - free(pFiles.files[i]); + if (pFiles.fileCnt > 1) { + for (size_t i = 0; i < pFiles.fileCnt; i++) { + free(pFiles.files[i]); + } } free(pFiles.files); exitWrapper(mainRet);