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
1413f577
Commit
1413f577
authored
Sep 07, 2019
by
Sven Baars
Committed by
Alexandre Julliard
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Fix some memory leaks on error path (Coverity).
Signed-off-by:
Sven Baars
<
sven.wine@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b56d19d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
pnp.c
dlls/hidclass.sys/pnp.c
+6
-0
No files found.
dlls/hidclass.sys/pnp.c
View file @
1413f577
...
...
@@ -123,6 +123,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
{
ERR
(
"Minidriver AddDevice failed (%x)
\n
"
,
status
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
status
;
}
...
...
@@ -133,6 +134,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
{
ERR
(
"Minidriver failed to get Attributes(%x)
\n
"
,
status
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
status
;
}
...
...
@@ -147,6 +149,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
{
ERR
(
"Cannot get Device Descriptor(%x)
\n
"
,
status
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
status
;
}
for
(
i
=
0
;
i
<
descriptor
.
bNumDescriptors
;
i
++
)
...
...
@@ -157,6 +160,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
{
ERR
(
"No Report Descriptor found in reply
\n
"
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
status
;
}
...
...
@@ -168,6 +172,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
ERR
(
"Cannot get Report Descriptor(%x)
\n
"
,
status
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
reportDescriptor
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
status
;
}
...
...
@@ -178,6 +183,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
{
ERR
(
"Cannot parse Report Descriptor
\n
"
);
HID_DeleteDevice
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
hiddev
);
return
STATUS_NOT_SUPPORTED
;
}
...
...
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