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
nexedi
linux
Commits
4b19f739
Commit
4b19f739
authored
Jun 11, 2003
by
Alexander Viro
Committed by
Linus Torvalds
Jun 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] tty_driver refcounting
Fixes a couple of leaks in char_dev.c
parent
6cd8b047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
fs/char_dev.c
fs/char_dev.c
+5
-2
No files found.
fs/char_dev.c
View file @
4b19f739
...
@@ -221,7 +221,7 @@ int register_chrdev(unsigned int major, const char *name,
...
@@ -221,7 +221,7 @@ int register_chrdev(unsigned int major, const char *name,
out:
out:
kobject_put
(
&
cdev
->
kobj
);
kobject_put
(
&
cdev
->
kobj
);
out2:
out2:
__unregister_chrdev_region
(
cd
->
major
,
0
,
256
);
kfree
(
__unregister_chrdev_region
(
cd
->
major
,
0
,
256
)
);
return
err
;
return
err
;
}
}
...
@@ -366,7 +366,10 @@ int cdev_add(struct cdev *p, dev_t dev, unsigned count)
...
@@ -366,7 +366,10 @@ int cdev_add(struct cdev *p, dev_t dev, unsigned count)
int
err
=
kobject_add
(
&
p
->
kobj
);
int
err
=
kobject_add
(
&
p
->
kobj
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
return
kobj_map
(
cdev_map
,
dev
,
count
,
NULL
,
exact_match
,
exact_lock
,
p
);
err
=
kobj_map
(
cdev_map
,
dev
,
count
,
NULL
,
exact_match
,
exact_lock
,
p
);
if
(
err
)
kobject_del
(
&
p
->
kobj
);
return
err
;
}
}
void
cdev_unmap
(
dev_t
dev
,
unsigned
count
)
void
cdev_unmap
(
dev_t
dev
,
unsigned
count
)
...
...
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