Fossil

Diff
Login

Diff

Differences From Artifact [c1bb93aa8b]:

To Artifact [fa856c8d25]:


342
343
344
345
346
347
348










349
350
351
352
353
354
355
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365







+
+
+
+
+
+
+
+
+
+







}

/*
** atexit() handler which frees up "some" of the resources
** used by fossil.
*/
static void fossil_atexit(void) {
#if defined(_WIN32) && defined(USE_TCL_STUBS)
  /* If Tcl is compiled on win32 using the latest mingw,
   * fossil crashes when exiting while Tcl is still loaded.
   * That's a bug in mingw, see:
   * <http://comments.gmane.org/gmane.comp.gnu.mingw.user/41724>
   * but the workaround is not that bad at all: */
  if( g.tcl.library ){
    FreeLibrary(g.tcl.library);
  }
#endif
#ifdef FOSSIL_ENABLE_JSON
  cson_value_free(g.json.gc.v);
  memset(&g.json, 0, sizeof(g.json));
#endif
  free(g.zErrMsg);
  if(g.db){
    db_close(0);