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
777383b8
Commit
777383b8
authored
Nov 21, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Use standard C functions for memory allocation in rowpos.c.
parent
f41214ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
oledb_private.h
dlls/oledb32/oledb_private.h
+0
-5
rowpos.c
dlls/oledb32/rowpos.c
+6
-6
No files found.
dlls/oledb32/oledb_private.h
View file @
777383b8
...
...
@@ -27,8 +27,3 @@ HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPWSTR initstring, REFIID
IUnknown
**
datasource
)
DECLSPEC_HIDDEN
;
extern
HINSTANCE
instance
;
static
inline
void
*
__WINE_ALLOC_SIZE
(
2
)
heap_realloc_zero
(
void
*
mem
,
size_t
size
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
mem
,
size
);
}
dlls/oledb32/rowpos.c
View file @
777383b8
...
...
@@ -28,7 +28,6 @@
#include "oledb_private.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
...
...
@@ -152,7 +151,7 @@ static ULONG WINAPI rowpos_Release(IRowPosition* iface)
if
(
This
->
rowset
)
IRowset_Release
(
This
->
rowset
);
if
(
This
->
chrst
)
IChapteredRowset_Release
(
This
->
chrst
);
rowposchange_cp_destroy
(
&
This
->
cp
);
heap_
free
(
This
);
free
(
This
);
}
return
ref
;
...
...
@@ -405,16 +404,17 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
if
(
i
==
This
->
sinks_size
)
{
new_sinks
=
heap_realloc_zero
(
This
->
sinks
,
2
*
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
new_sinks
=
realloc
(
This
->
sinks
,
2
*
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
if
(
!
new_sinks
)
return
E_OUTOFMEMORY
;
memset
(
new_sinks
+
This
->
sinks_size
,
0
,
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
This
->
sinks
=
new_sinks
;
This
->
sinks_size
*=
2
;
}
}
else
{
This
->
sinks
=
heap_alloc_zero
(
10
*
sizeof
(
*
This
->
sinks
));
This
->
sinks
=
calloc
(
10
,
sizeof
(
*
This
->
sinks
));
if
(
!
This
->
sinks
)
return
E_OUTOFMEMORY
;
This
->
sinks_size
=
10
;
...
...
@@ -477,7 +477,7 @@ void rowposchange_cp_destroy(rowpos_cp *cp)
if
(
cp
->
sinks
[
i
])
IRowPositionChange_Release
(
cp
->
sinks
[
i
]);
}
heap_
free
(
cp
->
sinks
);
free
(
cp
->
sinks
);
}
HRESULT
create_oledb_rowpos
(
IUnknown
*
outer
,
void
**
obj
)
...
...
@@ -490,7 +490,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IRowPosition_iface
.
lpVtbl
=
&
rowpos_vtbl
;
...
...
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