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
8ed06175
Commit
8ed06175
authored
Dec 15, 2009
by
James Hawkins
Committed by
Alexandre Julliard
Dec 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Free the temp buffer if we haven't assigned it to *appValue.
parent
b530f38b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
appsearch.c
dlls/msi/appsearch.c
+4
-2
No files found.
dlls/msi/appsearch.c
View file @
8ed06175
...
...
@@ -739,6 +739,7 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
size_t
dirLen
=
lstrlenW
(
dir
),
fileLen
=
lstrlenW
(
sig
->
File
);
WCHAR
subpath
[
MAX_PATH
];
WCHAR
*
buf
;
DWORD
len
;
static
const
WCHAR
starDotStarW
[]
=
{
'*'
,
'.'
,
'*'
,
0
};
...
...
@@ -753,7 +754,8 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
* here. Add two because we might need to add a backslash if the dir name
* isn't backslash-terminated.
*/
buf
=
msi_alloc
(
(
dirLen
+
max
(
fileLen
,
strlenW
(
starDotStarW
))
+
2
)
*
sizeof
(
WCHAR
));
len
=
dirLen
+
max
(
fileLen
,
strlenW
(
starDotStarW
))
+
2
;
buf
=
msi_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
buf
)
return
ERROR_OUTOFMEMORY
;
...
...
@@ -815,7 +817,7 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
}
}
if
(
!*
appValue
)
if
(
*
appValue
!=
buf
)
msi_free
(
buf
);
return
rc
;
...
...
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