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
cce78c24
Commit
cce78c24
authored
Nov 17, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Use standard C functions for memory allocation in datainit.c.
parent
88e3c732
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
21 deletions
+10
-21
datainit.c
dlls/oledb32/datainit.c
+10
-21
No files found.
dlls/oledb32/datainit.c
View file @
cce78c24
...
...
@@ -29,7 +29,6 @@
#include "oledb_private.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
...
...
@@ -191,7 +190,7 @@ static ULONG WINAPI dbinit_Release(IDBInitialize *iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
heap_
free
(
This
);
free
(
This
);
return
ref
;
}
...
...
@@ -231,7 +230,7 @@ static HRESULT create_db_init(IUnknown **obj)
*
obj
=
NULL
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDBInitialize_iface
.
lpVtbl
=
&
dbinit_vtbl
;
...
...
@@ -282,7 +281,7 @@ static ULONG WINAPI datainit_Release(IDataInitialize *iface)
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
heap_
free
(
This
);
free
(
This
);
return
ref
;
}
...
...
@@ -400,7 +399,7 @@ static HRESULT add_dbprop_to_list(struct dbprops *props, BSTR name, BSTR value)
{
struct
dbprop_pair
*
pair
;
pair
=
heap_
alloc
(
sizeof
(
*
pair
));
pair
=
m
alloc
(
sizeof
(
*
pair
));
if
(
!
pair
)
return
E_OUTOFMEMORY
;
...
...
@@ -419,7 +418,7 @@ static void free_dbprop_list(struct dbprops *props)
list_remove
(
&
p
->
entry
);
SysFreeString
(
p
->
name
);
SysFreeString
(
p
->
value
);
heap_
free
(
p
);
free
(
p
);
}
}
...
...
@@ -604,26 +603,16 @@ static void datasource_release(BOOL created, IUnknown **datasource)
*
datasource
=
NULL
;
}
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
src
)
{
WCHAR
*
dest
;
if
(
!
src
)
return
NULL
;
dest
=
heap_alloc
((
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
dest
)
lstrcpyW
(
dest
,
src
);
return
dest
;
}
static
WCHAR
*
strstriW
(
const
WCHAR
*
str
,
const
WCHAR
*
sub
)
{
LPWSTR
strlower
,
sublower
,
r
;
strlower
=
CharLowerW
(
strdupW
(
str
));
sublower
=
CharLowerW
(
strdupW
(
sub
));
strlower
=
CharLowerW
(
wcsdup
(
str
));
sublower
=
CharLowerW
(
wcsdup
(
sub
));
r
=
wcsstr
(
strlower
,
sublower
);
if
(
r
)
r
=
(
LPWSTR
)
str
+
(
r
-
strlower
);
heap_
free
(
strlower
);
heap_
free
(
sublower
);
free
(
strlower
);
free
(
sublower
);
return
r
;
}
...
...
@@ -1017,7 +1006,7 @@ HRESULT create_data_init(IUnknown *outer, void **obj)
*
obj
=
NULL
;
This
=
heap_
alloc
(
sizeof
(
*
This
));
This
=
m
alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDataInitialize_iface
.
lpVtbl
=
&
datainit_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