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
dcc049ad
Commit
dcc049ad
authored
Aug 17, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Aug 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Use CRT allocation functions.
parent
aa8e2a16
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
convert.c
dlls/oledb32/convert.c
+2
-3
dslocator.c
dlls/oledb32/dslocator.c
+4
-5
errorinfo.c
dlls/oledb32/errorinfo.c
+5
-6
marshal.c
dlls/oledb32/tests/marshal.c
+2
-2
No files found.
dlls/oledb32/convert.c
View file @
dcc049ad
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include "oledb_private.h"
#include "oledb_private.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
...
@@ -102,7 +101,7 @@ static ULONG WINAPI convert_Release(IDataConvert* iface)
...
@@ -102,7 +101,7 @@ static ULONG WINAPI convert_Release(IDataConvert* iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
if
(
ref
==
0
)
heap_
free
(
This
);
free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -1705,7 +1704,7 @@ HRESULT create_oledb_convert(IUnknown *outer, void **obj)
...
@@ -1705,7 +1704,7 @@ HRESULT create_oledb_convert(IUnknown *outer, void **obj)
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDataConvert_iface
.
lpVtbl
=
&
convert_vtbl
;
This
->
IDataConvert_iface
.
lpVtbl
=
&
convert_vtbl
;
...
...
dlls/oledb32/dslocator.c
View file @
dcc049ad
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include "resource.h"
#include "resource.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
...
@@ -49,7 +48,7 @@ struct datasource
...
@@ -49,7 +48,7 @@ struct datasource
static
struct
datasource
*
create_datasource
(
WCHAR
*
guid
)
static
struct
datasource
*
create_datasource
(
WCHAR
*
guid
)
{
{
struct
datasource
*
data
=
heap_alloc_zero
(
sizeof
(
struct
datasource
));
struct
datasource
*
data
=
calloc
(
1
,
sizeof
(
struct
datasource
));
if
(
data
)
if
(
data
)
{
{
CLSIDFromString
(
guid
,
&
data
->
clsid
);
CLSIDFromString
(
guid
,
&
data
->
clsid
);
...
@@ -75,7 +74,7 @@ static void destroy_datasource(struct datasource *data)
...
@@ -75,7 +74,7 @@ static void destroy_datasource(struct datasource *data)
if
(
data
->
provider
)
if
(
data
->
provider
)
IDBProperties_Release
(
data
->
provider
);
IDBProperties_Release
(
data
->
provider
);
heap_
free
(
data
);
free
(
data
);
}
}
static
BOOL
initialize_datasource
(
struct
datasource
*
data
)
static
BOOL
initialize_datasource
(
struct
datasource
*
data
)
...
@@ -191,7 +190,7 @@ static ULONG WINAPI dslocator_Release(IDataSourceLocator *iface)
...
@@ -191,7 +190,7 @@ static ULONG WINAPI dslocator_Release(IDataSourceLocator *iface)
if
(
!
ref
)
if
(
!
ref
)
{
{
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -775,7 +774,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj)
...
@@ -775,7 +774,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj)
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDataSourceLocator_iface
.
lpVtbl
=
&
DSLocatorVtbl
;
This
->
IDataSourceLocator_iface
.
lpVtbl
=
&
DSLocatorVtbl
;
...
...
dlls/oledb32/errorinfo.c
View file @
dcc049ad
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include "oledb_private.h"
#include "oledb_private.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -124,8 +123,8 @@ static ULONG WINAPI errorrecords_Release(IErrorInfo* iface)
...
@@ -124,8 +123,8 @@ static ULONG WINAPI errorrecords_Release(IErrorInfo* iface)
CoTaskMemFree
(
dispparams
->
rgvarg
);
CoTaskMemFree
(
dispparams
->
rgvarg
);
CoTaskMemFree
(
dispparams
->
rgdispidNamedArgs
);
CoTaskMemFree
(
dispparams
->
rgdispidNamedArgs
);
}
}
heap_
free
(
This
->
records
);
free
(
This
->
records
);
heap_
free
(
This
);
free
(
This
);
}
}
return
ref
;
return
ref
;
}
}
...
@@ -276,7 +275,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
...
@@ -276,7 +275,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
if
(
!
This
->
records
)
if
(
!
This
->
records
)
{
{
const
unsigned
int
initial_size
=
16
;
const
unsigned
int
initial_size
=
16
;
if
(
!
(
This
->
records
=
heap_
alloc
(
initial_size
*
sizeof
(
*
This
->
records
))))
if
(
!
(
This
->
records
=
m
alloc
(
initial_size
*
sizeof
(
*
This
->
records
))))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
This
->
allocated
=
initial_size
;
This
->
allocated
=
initial_size
;
...
@@ -285,7 +284,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
...
@@ -285,7 +284,7 @@ static HRESULT WINAPI errorrec_AddErrorRecord(IErrorRecords *iface, ERRORINFO *p
{
{
struct
ErrorEntry
*
new_ptr
;
struct
ErrorEntry
*
new_ptr
;
new_ptr
=
heap_
realloc
(
This
->
records
,
2
*
This
->
allocated
*
sizeof
(
*
This
->
records
));
new_ptr
=
realloc
(
This
->
records
,
2
*
This
->
allocated
*
sizeof
(
*
This
->
records
));
if
(
!
new_ptr
)
if
(
!
new_ptr
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -419,7 +418,7 @@ HRESULT create_error_info(IUnknown *outer, void **obj)
...
@@ -419,7 +418,7 @@ HRESULT create_error_info(IUnknown *outer, void **obj)
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IErrorInfo_iface
.
lpVtbl
=
&
ErrorInfoVtbl
;
This
->
IErrorInfo_iface
.
lpVtbl
=
&
ErrorInfoVtbl
;
...
...
dlls/oledb32/tests/marshal.c
View file @
dcc049ad
...
@@ -81,7 +81,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
...
@@ -81,7 +81,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
DispatchMessageW
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
free
(
data
);
CoUninitialize
();
CoUninitialize
();
...
@@ -92,7 +92,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object,
...
@@ -92,7 +92,7 @@ static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object,
{
{
DWORD
tid
=
0
;
DWORD
tid
=
0
;
HANDLE
marshal_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
HANDLE
marshal_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
struct
host_object_data
*
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
data
));
struct
host_object_data
*
data
=
malloc
(
sizeof
(
*
data
));
data
->
stream
=
stream
;
data
->
stream
=
stream
;
data
->
iid
=
*
riid
;
data
->
iid
=
*
riid
;
...
...
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