Permalink
Browse files

- Reset the lists to NULL properly. It can't be done in the function …

…of course.

#- Such a simple thing :S

SVN Rev: 3218
  • Loading branch information...
1 parent c70cb6d commit 14345b084a91d688382b2a5f5a341990f2aa152c @derickr derickr committed Feb 7, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −0 xdebug.c
  2. +0 −1 xdebug_llist.c
View
@@ -643,10 +643,12 @@ static void xdebug_stack_element_dtor(void *dummy, void *elem)
if (e->used_vars) {
xdebug_llist_destroy(e->used_vars, NULL);
+ e->used_vars = NULL;
}
if (e->profile.call_list) {
xdebug_llist_destroy(e->profile.call_list, NULL);
+ e->profile.call_list = NULL;
}
xdfree(e);
@@ -823,6 +825,7 @@ ZEND_MODULE_POST_ZEND_DEACTIVATE_D(xdebug)
XG(do_code_coverage) = 0;
xdebug_hash_destroy(XG(code_coverage));
+ XG(code_coverage) = NULL;
if (XG(context.list.last_file)) {
xdfree(XG(context).list.last_file);
@@ -837,6 +840,7 @@ ZEND_MODULE_POST_ZEND_DEACTIVATE_D(xdebug)
}
xdebug_llist_destroy(XG(collected_errors), NULL);
+ XG(collected_errors) = NULL;
/* Reset var_dump and set_time_limit to the original function */
if (XG(var_dump_overloaded)) {
View
@@ -180,7 +180,6 @@ void xdebug_llist_destroy(xdebug_llist *l, void *user)
xdebug_llist_empty(l, user);
free (l);
- l = NULL;
}
/*

0 comments on commit 14345b0

Please sign in to comment.