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
17375fcb
Commit
17375fcb
authored
Jan 13, 2004
by
Krishna Kumar
Committed by
David S. Miller
Jan 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AF_KEY]: In pfkey_get(), do not dereference xfrm_state after it is put.
parent
81187eb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
net/key/af_key.c
net/key/af_key.c
+3
-1
No files found.
net/key/af_key.c
View file @
17375fcb
...
...
@@ -1283,6 +1283,7 @@ static int pfkey_delete(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
static
int
pfkey_get
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
struct
sadb_msg
*
hdr
,
void
**
ext_hdrs
)
{
__u8
proto
;
struct
sk_buff
*
out_skb
;
struct
sadb_msg
*
out_hdr
;
struct
xfrm_state
*
x
;
...
...
@@ -1297,6 +1298,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr,
return
-
ESRCH
;
out_skb
=
pfkey_xfrm_state2msg
(
x
,
1
,
3
);
proto
=
x
->
id
.
proto
;
xfrm_state_put
(
x
);
if
(
IS_ERR
(
out_skb
))
return
PTR_ERR
(
out_skb
);
...
...
@@ -1304,7 +1306,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr,
out_hdr
=
(
struct
sadb_msg
*
)
out_skb
->
data
;
out_hdr
->
sadb_msg_version
=
hdr
->
sadb_msg_version
;
out_hdr
->
sadb_msg_type
=
SADB_DUMP
;
out_hdr
->
sadb_msg_satype
=
pfkey_proto2satype
(
x
->
id
.
proto
);
out_hdr
->
sadb_msg_satype
=
pfkey_proto2satype
(
proto
);
out_hdr
->
sadb_msg_errno
=
0
;
out_hdr
->
sadb_msg_reserved
=
0
;
out_hdr
->
sadb_msg_seq
=
hdr
->
sadb_msg_seq
;
...
...
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