assert to ensure that dict buffer type is valid

This commit is contained in:
Danielle Rozenblit
2023-03-08 16:54:57 -08:00
parent 96e55c14f2
commit 70850eb72b
+4
View File
@@ -785,6 +785,8 @@ static void FIO_freeDict(const FIO_Dict_t* dict) {
free(dict->dictBuffer);
} else if (dict->dictBufferType == FIO_mmapDict) {
FIO_munmap(dict->dictBuffer, dict->dictBufferSize);
} else {
assert(0); /* Should not reach this case */
}
}
@@ -2759,6 +2761,8 @@ int FIO_decompressFilename(FIO_ctx_t* const fCtx, FIO_prefs_t* const prefs,
int const decodingError = FIO_decompressSrcFile(fCtx, prefs, ress, dstFileName, srcFileName);
FIO_freeDResources(ress);
return decodingError;
}