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
d4a3557e
Commit
d4a3557e
authored
Jul 24, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memory leak when driverfs symlink fails.
parent
309efdac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
drivers/base/fs.c
drivers/base/fs.c
+5
-1
No files found.
drivers/base/fs.c
View file @
d4a3557e
...
...
@@ -106,13 +106,17 @@ static void fill_devpath(struct device * dev, char * path, int length)
static
int
create_symlink
(
struct
driver_dir_entry
*
parent
,
char
*
name
,
char
*
path
)
{
struct
driver_file_entry
*
entry
;
int
error
;
entry
=
kmalloc
(
sizeof
(
struct
driver_file_entry
),
GFP_KERNEL
);
if
(
!
entry
)
return
-
ENOMEM
;
entry
->
name
=
name
;
entry
->
mode
=
S_IRUGO
;
return
driverfs_create_symlink
(
parent
,
entry
,
path
);
error
=
driverfs_create_symlink
(
parent
,
entry
,
path
);
if
(
error
)
kfree
(
entry
);
return
error
;
}
int
device_bus_link
(
struct
device
*
dev
)
...
...
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