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
b530f38b
Commit
b530f38b
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: Refactor freeing the import sql strings.
parent
1b7238a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
database.c
dlls/msi/database.c
+10
-11
No files found.
dlls/msi/database.c
View file @
b530f38b
...
...
@@ -493,10 +493,10 @@ done:
static
UINT
msi_add_table_to_db
(
MSIDATABASE
*
db
,
LPWSTR
*
columns
,
LPWSTR
*
types
,
LPWSTR
*
labels
,
DWORD
num_labels
,
DWORD
num_columns
)
{
UINT
r
;
UINT
r
=
ERROR_OUTOFMEMORY
;
DWORD
size
;
MSIQUERY
*
view
;
LPWSTR
create_sql
;
LPWSTR
create_sql
=
NULL
;
LPWSTR
prelude
,
columns_sql
,
postlude
;
prelude
=
msi_build_createsql_prelude
(
labels
[
0
]);
...
...
@@ -504,31 +504,30 @@ static UINT msi_add_table_to_db(MSIDATABASE *db, LPWSTR *columns, LPWSTR *types,
postlude
=
msi_build_createsql_postlude
(
labels
+
1
,
num_labels
-
1
);
/* skip over table name */
if
(
!
prelude
||
!
columns_sql
||
!
postlude
)
return
ERROR_OUTOFMEMORY
;
goto
done
;
size
=
lstrlenW
(
prelude
)
+
lstrlenW
(
columns_sql
)
+
lstrlenW
(
postlude
)
+
1
;
create_sql
=
msi_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
create_sql
)
return
ERROR_OUTOFMEMORY
;
goto
done
;
lstrcpyW
(
create_sql
,
prelude
);
lstrcatW
(
create_sql
,
columns_sql
);
lstrcatW
(
create_sql
,
postlude
);
msi_free
(
prelude
);
msi_free
(
columns_sql
);
msi_free
(
postlude
);
r
=
MSI_DatabaseOpenViewW
(
db
,
create_sql
,
&
view
);
msi_free
(
create_sql
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
goto
done
;
r
=
MSI_ViewExecute
(
view
,
NULL
);
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
done:
msi_free
(
prelude
);
msi_free
(
columns_sql
);
msi_free
(
postlude
);
msi_free
(
create_sql
);
return
r
;
}
...
...
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