@@ -346,12 +346,12 @@ (debug:print 0 "WARNING: -itempatt has been deprecated, please use -testpatt testpatt/itempatt method, new testpatt is "newval) (hash-table-set! args:arg-hash "-testpatt" newval) (hash-table-delete! args:arg-hash "-itempatt"))) (on-exit (lambda () - (if *megatest-db* - (db:close-all *megatest-db*)))) + (if *dbstruct-db* (db:close-all *dbstruct-db*)) + (if *megatest-db* (sqlite3:finalize! *megatest-db*)))) ;;====================================================================== ;; Misc general calls ;;======================================================================