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
a53591ad
Commit
a53591ad
authored
Aug 23, 2018
by
Francois Gouget
Committed by
Alexandre Julliard
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebus.sys: Avoid calling strdup().
Signed-off-by:
Francois Gouget
<
fgouget@free.fr
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
44598d33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bus_udev.c
dlls/winebus.sys/bus_udev.c
+5
-2
No files found.
dlls/winebus.sys/bus_udev.c
View file @
a53591ad
...
...
@@ -65,6 +65,7 @@
#include "ddk/wdm.h"
#include "ddk/hidtypes.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
#ifdef HAS_PROPER_INPUT_HEADER
...
...
@@ -1046,7 +1047,7 @@ static int parse_uevent_info(const char *uevent, DWORD *vendor_id,
DWORD
*
product_id
,
WCHAR
**
serial_number
)
{
DWORD
bus_type
;
char
*
tmp
=
strdup
(
uevent
)
;
char
*
tmp
;
char
*
saveptr
=
NULL
;
char
*
line
;
char
*
key
;
...
...
@@ -1055,6 +1056,8 @@ static int parse_uevent_info(const char *uevent, DWORD *vendor_id,
int
found_id
=
0
;
int
found_serial
=
0
;
tmp
=
heap_alloc
(
strlen
(
uevent
)
+
1
);
strcpy
(
tmp
,
uevent
);
line
=
strtok_r
(
tmp
,
"
\n
"
,
&
saveptr
);
while
(
line
!=
NULL
)
{
...
...
@@ -1092,7 +1095,7 @@ next_line:
line
=
strtok_r
(
NULL
,
"
\n
"
,
&
saveptr
);
}
free
(
tmp
);
heap_
free
(
tmp
);
return
(
found_id
&&
found_serial
);
}
...
...
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