vbscript: Fixed class_desc_t leak.

This commit is contained in:
Jacek Caban 2012-09-07 15:08:59 +02:00 committed by Alexandre Julliard
parent bc8876f9ce
commit bac5fdc85f
1 changed files with 9 additions and 0 deletions

View File

@ -115,6 +115,8 @@ static HRESULT set_ctx_site(VBScript *This)
static void release_script(script_ctx_t *ctx)
{
class_desc_t *class_desc;
collect_objects(ctx);
release_dynamic_vars(ctx->global_vars);
@ -130,6 +132,13 @@ static void release_script(script_ctx_t *ctx)
heap_free(iter);
}
while(ctx->procs) {
class_desc = ctx->procs;
ctx->procs = class_desc->next;
heap_free(class_desc);
}
if(ctx->host_global) {
IDispatch_Release(ctx->host_global);
ctx->host_global = NULL;