Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
169b4d42
Commit
169b4d42
authored
Mar 13, 2003
by
Oleg Drokin
Committed by
Greg Kroah-Hartman
Mar 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: memleak in Edgeport USB Serial Converter driver
parent
cb2d3c24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
drivers/usb/serial/io_ti.c
drivers/usb/serial/io_ti.c
+12
-2
No files found.
drivers/usb/serial/io_ti.c
View file @
169b4d42
...
...
@@ -468,7 +468,7 @@ static int TIIsTxActive (struct edgeport_port *port)
{
int
status
;
struct
out_endpoint_desc_block
*
oedb
;
__u8
lsr
;
__u8
*
lsr
;
int
bytes_left
=
0
;
oedb
=
kmalloc
(
sizeof
(
*
oedb
),
GFP_KERNEL
);
...
...
@@ -477,6 +477,13 @@ static int TIIsTxActive (struct edgeport_port *port)
return
-
ENOMEM
;
}
lsr
=
kmalloc
(
1
,
GFP_KERNEL
);
/* Sigh, that's right, just one byte,
as not all platforms can do DMA
from stack */
if
(
!
lsr
)
{
kfree
(
oedb
);
return
-
ENOMEM
;
}
/* Read the DMA Count Registers */
status
=
TIReadRam
(
port
->
port
->
serial
->
dev
,
port
->
dma_address
,
...
...
@@ -492,7 +499,7 @@ static int TIIsTxActive (struct edgeport_port *port)
status
=
TIReadRam
(
port
->
port
->
serial
->
dev
,
port
->
uart_base
+
UMPMEM_OFFS_UART_LSR
,
1
,
&
lsr
);
lsr
);
if
(
status
)
goto
exit_is_tx_active
;
...
...
@@ -508,6 +515,9 @@ static int TIIsTxActive (struct edgeport_port *port)
/* We return Not Active if we get any kind of error */
exit_is_tx_active:
dbg
(
"%s - return %d"
,
__FUNCTION__
,
bytes_left
);
kfree
(
lsr
);
kfree
(
oedb
);
return
bytes_left
;
}
...
...
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