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
83c8c9bd
Commit
83c8c9bd
authored
Sep 14, 2011
by
Jeff Liu
Committed by
David Sterba
Oct 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: trivial fix, a potential memory leak in btrfs_parse_early_options()
Signed-off-by:
Jie Liu
<
jeff.liu@oracle.com
>
parent
5ca49660
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
fs/btrfs/super.c
fs/btrfs/super.c
+8
-2
No files found.
fs/btrfs/super.c
View file @
83c8c9bd
...
...
@@ -419,7 +419,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
u64
*
subvol_rootid
,
struct
btrfs_fs_devices
**
fs_devices
)
{
substring_t
args
[
MAX_OPT_ARGS
];
char
*
opts
,
*
orig
,
*
p
;
char
*
device_name
,
*
opts
,
*
orig
,
*
p
;
int
error
=
0
;
int
intarg
;
...
...
@@ -470,8 +470,14 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
}
break
;
case
Opt_device
:
error
=
btrfs_scan_one_device
(
match_strdup
(
&
args
[
0
]),
device_name
=
match_strdup
(
&
args
[
0
]);
if
(
!
device_name
)
{
error
=
-
ENOMEM
;
goto
out
;
}
error
=
btrfs_scan_one_device
(
device_name
,
flags
,
holder
,
fs_devices
);
kfree
(
device_name
);
if
(
error
)
goto
out
;
break
;
...
...
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