MFC r275868:
Plug a memory leak in an error code path. Reported by: Coverity CID: 1018936
This commit is contained in:
parent
4f47290362
commit
551a3dd3e4
@ -1129,8 +1129,11 @@ sctp6_peeraddr(struct socket *so, struct sockaddr **addr)
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOENT);
|
||||
return (ENOENT);
|
||||
}
|
||||
if ((error = sa6_recoverscope(sin6)) != 0)
|
||||
if ((error = sa6_recoverscope(sin6)) != 0) {
|
||||
SCTP_FREE_SONAME(sin6);
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, error);
|
||||
return (error);
|
||||
}
|
||||
*addr = (struct sockaddr *)sin6;
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user