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
820981b3
Commit
820981b3
authored
Feb 14, 2009
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
twain_32: Replace realloc() and strdup().
parent
250b6993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
dsm_ctrl.c
dlls/twain_32/dsm_ctrl.c
+4
-3
No files found.
dlls/twain_32/dsm_ctrl.c
View file @
820981b3
...
...
@@ -84,10 +84,11 @@ twain_add_onedriver(const char *dsname) {
if
(
i
<
nrdevices
)
break
;
if
(
nrdevices
)
devices
=
realloc
(
devices
,
sizeof
(
devices
[
0
])
*
(
nrdevices
+
1
));
devices
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
devices
,
sizeof
(
devices
[
0
])
*
(
nrdevices
+
1
));
else
devices
=
malloc
(
sizeof
(
devices
[
0
]));
devices
[
nrdevices
].
modname
=
strdup
(
dsname
);
devices
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
devices
[
0
]));
if
((
devices
[
nrdevices
].
modname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
dsname
)
+
1
)))
lstrcpyA
(
devices
[
nrdevices
].
modname
,
dsname
);
devices
[
nrdevices
].
identity
=
sourceId
;
nrdevices
++
;
DSM_sourceId
++
;
...
...
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