Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6f0e215f
Commit
6f0e215f
authored
Oct 14, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Properly release global variables.
parent
84d5a396
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
interp.c
dlls/vbscript/interp.c
+9
-0
vbscript.c
dlls/vbscript/vbscript.c
+3
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/interp.c
View file @
6f0e215f
...
...
@@ -1561,11 +1561,20 @@ OP_LIST
#undef X
};
void
release_dynamic_vars
(
dynamic_var_t
*
var
)
{
while
(
var
)
{
VariantClear
(
&
var
->
v
);
var
=
var
->
next
;
}
}
static
void
release_exec
(
exec_ctx_t
*
ctx
)
{
unsigned
i
;
VariantClear
(
&
ctx
->
ret_val
);
release_dynamic_vars
(
ctx
->
dynamic_vars
);
if
(
ctx
->
this_obj
)
IDispatch_Release
(
ctx
->
this_obj
);
...
...
dlls/vbscript/vbscript.c
View file @
6f0e215f
...
...
@@ -114,6 +114,9 @@ static void release_script(script_ctx_t *ctx)
{
collect_objects
(
ctx
);
release_dynamic_vars
(
ctx
->
global_vars
);
ctx
->
global_vars
=
NULL
;
while
(
!
list_empty
(
&
ctx
->
named_items
))
{
named_item_t
*
iter
=
LIST_ENTRY
(
list_head
(
&
ctx
->
named_items
),
named_item_t
,
entry
);
...
...
dlls/vbscript/vbscript.h
View file @
6f0e215f
...
...
@@ -309,6 +309,7 @@ struct _vbscode_t {
void
release_vbscode
(
vbscode_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
compile_script
(
script_ctx_t
*
,
const
WCHAR
*
,
vbscode_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
exec_script
(
script_ctx_t
*
,
function_t
*
,
IDispatch
*
,
DISPPARAMS
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
void
release_dynamic_vars
(
dynamic_var_t
*
)
DECLSPEC_HIDDEN
;
#define TID_LIST \
XDIID(ErrObj) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment