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
3c2ec4ef
Commit
3c2ec4ef
authored
Nov 02, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdasql: Use CRT allocation functions.
parent
7b246524
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
session.c
dlls/msdasql/session.c
+12
-16
No files found.
dlls/msdasql/session.c
View file @
3c2ec4ef
...
...
@@ -25,7 +25,6 @@
#include "objbase.h"
#include "rpcproxy.h"
#include "msdasc.h"
#include "wine/heap.h"
#include "wine/debug.h"
#include "msdasql.h"
...
...
@@ -409,7 +408,7 @@ static ULONG WINAPI session_Release(IUnknown *iface)
TRACE
(
"destroying %p
\n
"
,
session
);
IUnknown_Release
(
session
->
datasource
);
heap_free
(
session
);
free
(
session
);
}
return
refs
;
}
...
...
@@ -693,15 +692,15 @@ static ULONG WINAPI command_Release(ICommandText *iface)
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
command
);
heap_
free
(
command
->
properties
);
free
(
command
->
properties
);
if
(
command
->
session
)
IUnknown_Release
(
command
->
session
);
if
(
command
->
hstmt
)
SQLFreeHandle
(
SQL_HANDLE_STMT
,
command
->
hstmt
);
heap_free
(
command
->
query
);
heap_free
(
command
);
free
(
command
->
query
);
free
(
command
);
}
return
refs
;
}
...
...
@@ -826,7 +825,7 @@ static ULONG WINAPI msdasql_rowset_Release(IRowset *iface)
if
(
rowset
->
caller
)
IUnknown_Release
(
rowset
->
caller
);
heap_free
(
rowset
);
free
(
rowset
);
}
return
refs
;
}
...
...
@@ -1259,7 +1258,7 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
*
rowset
=
NULL
;
if
(
!
wcsnicmp
(
command
->
query
,
L"select "
,
7
))
{
msrowset
=
heap_
alloc
(
sizeof
(
*
msrowset
));
msrowset
=
m
alloc
(
sizeof
(
*
msrowset
));
if
(
!
msrowset
)
return
E_OUTOFMEMORY
;
...
...
@@ -1326,8 +1325,7 @@ static HRESULT WINAPI command_GetCommandText(ICommandText *iface, GUID *dialect,
hr
=
DB_S_DIALECTIGNORED
;
}
*
commandstr
=
heap_alloc
((
lstrlenW
(
command
->
query
)
+
1
)
*
sizeof
(
WCHAR
));
wcscpy
(
*
commandstr
,
command
->
query
);
*
commandstr
=
wcsdup
(
command
->
query
);
return
hr
;
}
...
...
@@ -1339,15 +1337,13 @@ static HRESULT WINAPI command_SetCommandText(ICommandText *iface, REFGUID dialec
if
(
!
IsEqualGUID
(
&
DBGUID_DEFAULT
,
dialect
))
FIXME
(
"Currently non Default Dialect isn't supported
\n
"
);
heap_
free
(
command
->
query
);
free
(
command
->
query
);
if
(
commandstr
)
{
command
->
query
=
heap_alloc
((
lstrlenW
(
commandstr
)
+
1
)
*
sizeof
(
WCHAR
)
);
command
->
query
=
wcsdup
(
commandstr
);
if
(
!
command
->
query
)
return
E_OUTOFMEMORY
;
wcscpy
(
command
->
query
,
commandstr
);
}
else
command
->
query
=
NULL
;
...
...
@@ -1775,7 +1771,7 @@ static HRESULT WINAPI createcommand_CreateCommand(IDBCreateCommand *iface, IUnkn
if
(
outer
)
FIXME
(
"Outer not currently supported
\n
"
);
command
=
heap_
alloc
(
sizeof
(
*
command
));
command
=
m
alloc
(
sizeof
(
*
command
));
if
(
!
command
)
return
E_OUTOFMEMORY
;
...
...
@@ -1791,7 +1787,7 @@ static HRESULT WINAPI createcommand_CreateCommand(IDBCreateCommand *iface, IUnkn
command
->
hstmt
=
NULL
;
command
->
prop_count
=
ARRAY_SIZE
(
msdasql_init_props
);
command
->
properties
=
heap_
alloc
(
sizeof
(
msdasql_init_props
));
command
->
properties
=
m
alloc
(
sizeof
(
msdasql_init_props
));
memcpy
(
command
->
properties
,
msdasql_init_props
,
sizeof
(
msdasql_init_props
));
IUnknown_QueryInterface
(
&
session
->
session_iface
,
&
IID_IUnknown
,
(
void
**
)
&
command
->
session
);
...
...
@@ -1915,7 +1911,7 @@ HRESULT create_db_session(REFIID riid, IUnknown *datasource, HDBC hdbc, void **u
struct
msdasql_session
*
session
;
HRESULT
hr
;
session
=
heap_
alloc
(
sizeof
(
*
session
));
session
=
m
alloc
(
sizeof
(
*
session
));
if
(
!
session
)
return
E_OUTOFMEMORY
;
...
...
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