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
faf750f2
Commit
faf750f2
authored
Mar 23, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Remove stream from streams cache before destroying it.
parent
367c2048
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
database.c
dlls/msi/database.c
+31
-0
msipriv.h
dlls/msi/msipriv.h
+1
-0
streams.c
dlls/msi/streams.c
+1
-1
No files found.
dlls/msi/database.c
View file @
faf750f2
...
...
@@ -176,6 +176,37 @@ static void free_transforms( MSIDATABASE *db )
}
}
void
db_destroy_stream
(
MSIDATABASE
*
db
,
LPCWSTR
stname
)
{
MSISTREAM
*
stream
,
*
stream2
;
LIST_FOR_EACH_ENTRY_SAFE
(
stream
,
stream2
,
&
db
->
streams
,
MSISTREAM
,
entry
)
{
HRESULT
r
;
STATSTG
stat
;
r
=
IStream_Stat
(
stream
->
stm
,
&
stat
,
0
);
if
(
FAILED
(
r
))
{
WARN
(
"failed to stat stream r = %08x
\n
"
,
r
);
continue
;
}
if
(
!
strcmpW
(
stname
,
stat
.
pwcsName
))
{
TRACE
(
"destroying %s
\n
"
,
debugstr_w
(
stname
));
list_remove
(
&
stream
->
entry
);
IStream_Release
(
stream
->
stm
);
msi_free
(
stream
);
IStorage_DestroyElement
(
db
->
storage
,
stname
);
CoTaskMemFree
(
stat
.
pwcsName
);
break
;
}
CoTaskMemFree
(
stat
.
pwcsName
);
}
}
static
void
free_streams
(
MSIDATABASE
*
db
)
{
while
(
!
list_empty
(
&
db
->
streams
)
)
...
...
dlls/msi/msipriv.h
View file @
faf750f2
...
...
@@ -722,6 +722,7 @@ extern BOOL decode_streamname(LPCWSTR in, LPWSTR out);
/* database internals */
extern
UINT
db_get_raw_stream
(
MSIDATABASE
*
,
LPCWSTR
,
IStream
**
);
void
db_destroy_stream
(
MSIDATABASE
*
,
LPCWSTR
);
extern
UINT
MSI_OpenDatabaseW
(
LPCWSTR
,
LPCWSTR
,
MSIDATABASE
**
);
extern
UINT
MSI_DatabaseOpenViewW
(
MSIDATABASE
*
,
LPCWSTR
,
MSIQUERY
**
);
extern
UINT
MSI_OpenQuery
(
MSIDATABASE
*
,
MSIQUERY
**
,
LPCWSTR
,
...
);
...
...
dlls/msi/streams.c
View file @
faf750f2
...
...
@@ -183,7 +183,7 @@ static UINT STREAMS_set_row(struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, U
}
encname
=
encode_streamname
(
FALSE
,
name
);
IStorage_DestroyElement
(
sv
->
db
->
storage
,
encname
);
db_destroy_stream
(
sv
->
db
,
encname
);
r
=
write_stream_data
(
sv
->
db
->
storage
,
name
,
data
,
count
,
FALSE
);
if
(
r
!=
ERROR_SUCCESS
)
...
...
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