Fix several locations with potential memory leak

This commit is contained in:
shixuantong
2025-06-09 21:23:23 +08:00
parent f9938c217d
commit de8d9e8914
6 changed files with 162 additions and 71 deletions
+2
View File
@@ -56,6 +56,7 @@ static int testSimpleAPI(void)
} else {
DISPLAY("ERROR: %s\n", ZSTD_getErrorName(ret));
}
free(output);
return 1;
}
if (ret != size) {
@@ -64,6 +65,7 @@ static int testSimpleAPI(void)
}
if (memcmp(EXPECTED, output, size) != 0) {
DISPLAY("ERROR: Wrong decoded output produced\n");
free(output);
return 1;
}