Skip to content

Commit

Permalink
Minor adjustments to datastream MDAL handle close logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gransom committed Mar 28, 2024
1 parent 31dc09c commit eaa218e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/datastream/datastream.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void freestream(DATASTREAM stream) {
if (stream->files[curfile].metahandle && ms->mdal->close(stream->files[curfile].metahandle)) {
LOG(LOG_WARNING, "Failed to close meta handle for file %zu\n", curfile);
}
stream->files[curfile].metahandle = NULL; // likely unnecessary, but just in case
}
// free the file list itself
free(stream->files);
Expand Down Expand Up @@ -1338,6 +1339,7 @@ int close_current_obj(DATASTREAM stream, FTAG* curftag, MDAL_CTXT mdalctxt) {
struct stat stval = {0};
if ( mdal->fstat( rhandle, &(stval) ) ) {
LOG( LOG_ERR, "Failed to stat newly created rebuild marker\n" );
mdal->close(rhandle);
rtag_free( &(rtag) );
if (releasectxt) {
mdal->destroyctxt(mdalctxt);
Expand Down

0 comments on commit eaa218e

Please sign in to comment.