diff --git a/ghc/runtime/storage/SMinit.lc b/ghc/runtime/storage/SMinit.lc index 4224c9a2b948722b9b95f851a00ad3ca1c706800..6de8ecba5b62dc11cca3ea9c7cb9f674279f88b5 100644 --- a/ghc/runtime/storage/SMinit.lc +++ b/ghc/runtime/storage/SMinit.lc @@ -23,6 +23,8 @@ A filehandle to which any storage-manager statistics should be written. rtsBool exitSM (smInfo *sm_info) { + /* Upon closing down the storage manager, we free all foreign objects */ + freeForeigns(sm_info->ForeignObjList); stat_exit(sm_info->hp - hp_start); return rtsTrue; /* I'm happy */