Skip to content

Commit

Permalink
assert to ensure that dict buffer type is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellerozenblit committed Mar 9, 2023
1 parent 96e55c1 commit 4561522
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
else assert(0); /* Should not reach this case */
}
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4561522

Please sign in to comment.