Skip to content

Commit

Permalink
Merge pull request #326 from LLNL/rc2dev-bug-mcm86-13apr23-free-file-…
Browse files Browse the repository at this point in the history
…globals

Merge pull request #306 from LLNL/bug-mcm86-13apr23-free-file-globals
  • Loading branch information
markcmiller86 committed May 25, 2023
2 parents 77ca9c7 + 7555590 commit 89a2a3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/silo/silo.c
Expand Up @@ -4432,6 +4432,7 @@ DBClose(DBfile *dbfile)
{
int id;
int retval;
SILO_Globals_t *tmp_file_scope_globals;

API_BEGIN2("DBClose", int, -1, api_dummy) {
if (!dbfile)
Expand All @@ -4449,8 +4450,9 @@ DBClose(DBfile *dbfile)
free(dbfile->pub.file_lib_version);
db_unregister_file(dbfile);

tmp_file_scope_globals = dbfile->pub.file_scope_globals;
retval = (dbfile->pub.close) (dbfile);
free(dbfile->pub.file_scope_globals);
free(tmp_file_scope_globals);
API_RETURN(retval);
}
API_END_NOPOP; /*BEWARE: If API_RETURN above is removed use API_END */
Expand Down

0 comments on commit 89a2a3a

Please sign in to comment.