Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f86cfd40
Commit
f86cfd40
authored
Nov 02, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Avoid a memory leak by freeing actions scripts in one place only.
parent
f5dddd55
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
action.c
dlls/msi/action.c
+1
-5
helpers.c
dlls/msi/helpers.c
+12
-7
msipriv.h
dlls/msi/msipriv.h
+1
-0
No files found.
dlls/msi/action.c
View file @
f86cfd40
...
...
@@ -1491,14 +1491,10 @@ static UINT execute_script(MSIPACKAGE *package, UINT script )
ui_actionstart
(
package
,
action
);
TRACE
(
"Executing Action (%s)
\n
"
,
debugstr_w
(
action
));
rc
=
ACTION_PerformAction
(
package
,
action
,
TRUE
);
msi_free
(
package
->
script
->
Actions
[
script
][
i
]);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
}
msi_free
(
package
->
script
->
Actions
[
script
]);
package
->
script
->
ActionCount
[
script
]
=
0
;
package
->
script
->
Actions
[
script
]
=
NULL
;
msi_free_action_script
(
package
,
script
);
return
rc
;
}
...
...
dlls/msi/helpers.c
View file @
f86cfd40
...
...
@@ -384,6 +384,17 @@ UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action)
return
ERROR_SUCCESS
;
}
void
msi_free_action_script
(
MSIPACKAGE
*
package
,
UINT
script
)
{
int
i
;
for
(
i
=
0
;
i
<
package
->
script
->
ActionCount
[
script
];
i
++
)
msi_free
(
package
->
script
->
Actions
[
script
][
i
]);
msi_free
(
package
->
script
->
Actions
[
script
]);
package
->
script
->
Actions
[
script
]
=
NULL
;
package
->
script
->
ActionCount
[
script
]
=
0
;
}
static
void
remove_tracked_tempfiles
(
MSIPACKAGE
*
package
)
{
struct
list
*
item
,
*
cursor
;
...
...
@@ -571,13 +582,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
if
(
package
->
script
)
{
for
(
i
=
0
;
i
<
TOTAL_SCRIPTS
;
i
++
)
{
int
j
;
for
(
j
=
0
;
j
<
package
->
script
->
ActionCount
[
i
];
j
++
)
msi_free
(
package
->
script
->
Actions
[
i
][
j
]);
msi_free
(
package
->
script
->
Actions
[
i
]);
}
msi_free_action_script
(
package
,
i
);
for
(
i
=
0
;
i
<
package
->
script
->
UniqueActionsCount
;
i
++
)
msi_free
(
package
->
script
->
UniqueActions
[
i
]);
...
...
dlls/msi/msipriv.h
View file @
f86cfd40
...
...
@@ -752,6 +752,7 @@ extern MSIFILE *get_loaded_file( MSIPACKAGE* package, LPCWSTR file );
extern
MSIFOLDER
*
get_loaded_folder
(
MSIPACKAGE
*
package
,
LPCWSTR
dir
);
extern
int
track_tempfile
(
MSIPACKAGE
*
package
,
LPCWSTR
name
,
LPCWSTR
path
);
extern
UINT
schedule_action
(
MSIPACKAGE
*
package
,
UINT
script
,
LPCWSTR
action
);
extern
void
msi_free_action_script
(
MSIPACKAGE
*
package
,
UINT
script
);
extern
LPWSTR
build_icon_path
(
MSIPACKAGE
*
,
LPCWSTR
);
extern
LPWSTR
build_directory_name
(
DWORD
,
...);
extern
BOOL
create_full_pathW
(
const
WCHAR
*
path
);
...
...
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