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
c308cc50
Commit
c308cc50
authored
Jun 08, 2003
by
Joe Thornber
Committed by
Greg Kroah-Hartman
Jun 08, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dm: Fix memory leak in dm_register_target()
[From Patrick Caulfield]
parent
ee3a7e26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
drivers/md/dm-target.c
drivers/md/dm-target.c
+3
-2
No files found.
drivers/md/dm-target.c
View file @
c308cc50
...
@@ -109,9 +109,10 @@ int dm_register_target(struct target_type *t)
...
@@ -109,9 +109,10 @@ int dm_register_target(struct target_type *t)
return
-
ENOMEM
;
return
-
ENOMEM
;
down_write
(
&
_lock
);
down_write
(
&
_lock
);
if
(
__find_target_type
(
t
->
name
))
if
(
__find_target_type
(
t
->
name
))
{
kfree
(
ti
);
rv
=
-
EEXIST
;
rv
=
-
EEXIST
;
else
}
else
list_add
(
&
ti
->
list
,
&
_targets
);
list_add
(
&
ti
->
list
,
&
_targets
);
up_write
(
&
_lock
);
up_write
(
&
_lock
);
...
...
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