Branch: Tag:

2008-05-30

2008-05-30 15:26:22 by Martin Stjernholm <mast@lysator.liu.se>

Fixed fatal that could occur when exiting a module where the init function
threw an error.

Rev: src/dynamic_load.c:1.85

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dynamic_load.c,v 1.84 2005/10/19 12:41:20 nilsson Exp $ + || $Id: dynamic_load.c,v 1.85 2008/05/30 15:26:22 mast Exp $   */      #ifdef TESTING
24:   # include "lex.h"   # include "object.h"    - RCSID("$Id: dynamic_load.c,v 1.84 2005/10/19 12:41:20 nilsson Exp $"); + RCSID("$Id: dynamic_load.c,v 1.85 2008/05/30 15:26:22 mast Exp $");      #else /* TESTING */   
653: Inside #if defined(USE_DYNAMIC_MODULES)
   else    (*tmp->exit)();    UNSETJMP(recovery); +  if (tmp->module_prog) {    free_program(tmp->module_prog);    tmp->module_prog = NULL; -  +  }    free_string(tmp->name);    tmp->name = NULL;    }