Commit 74d6fe35 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Remove unused and redundant name field from STREAM structure.

parent edd9e8cc
...@@ -41,7 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb); ...@@ -41,7 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
typedef struct tabSTREAM typedef struct tabSTREAM
{ {
UINT str_index; UINT str_index;
LPWSTR name;
IStream *stream; IStream *stream;
} STREAM; } STREAM;
...@@ -72,7 +71,6 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr ...@@ -72,7 +71,6 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr
{ {
STREAM *stream; STREAM *stream;
WCHAR decoded[MAX_STREAM_NAME_LEN]; WCHAR decoded[MAX_STREAM_NAME_LEN];
LPWSTR ptr = name;
stream = msi_alloc(sizeof(STREAM)); stream = msi_alloc(sizeof(STREAM));
if (!stream) if (!stream)
...@@ -81,18 +79,11 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr ...@@ -81,18 +79,11 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr
if (encoded) if (encoded)
{ {
decode_streamname(name, decoded); decode_streamname(name, decoded);
ptr = decoded;
TRACE("stream -> %s %s\n", debugstr_w(name), debugstr_w(decoded)); TRACE("stream -> %s %s\n", debugstr_w(name), debugstr_w(decoded));
name = decoded;
} }
stream->name = strdupW(ptr); stream->str_index = msi_addstringW(sv->db->strings, 0, name, -1, 1, StringNonPersistent);
if (!stream->name)
{
msi_free(stream);
return NULL;
}
stream->str_index = msi_addstringW(sv->db->strings, 0, stream->name, -1, 1, StringNonPersistent);
stream->stream = stm; stream->stream = stm;
return stream; return stream;
} }
...@@ -404,8 +395,6 @@ static UINT STREAMS_delete(struct tagMSIVIEW *view) ...@@ -404,8 +395,6 @@ static UINT STREAMS_delete(struct tagMSIVIEW *view)
{ {
if (sv->streams[i]->stream) if (sv->streams[i]->stream)
IStream_Release(sv->streams[i]->stream); IStream_Release(sv->streams[i]->stream);
msi_free(sv->streams[i]->name);
msi_free(sv->streams[i]); msi_free(sv->streams[i]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment