Skip to content

Commit

Permalink
Merge pull request #306 from LLNL/bug-mcm86-13apr23-free-file-globals
Browse files Browse the repository at this point in the history
Patch from Dave Bremer
  • Loading branch information
markcmiller86 committed May 25, 2023
1 parent 77ca9c7 commit 7555590
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/silo/silo.c
Original file line number Diff line number Diff line change
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 7555590

Please sign in to comment.