mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
open_inet_sk(): don't leak socket fd on error
Reported by Coverity, CID 51628. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrew Vagin <avagin@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
c6e724f61a
commit
5e82fba10e
1 changed files with 2 additions and 2 deletions
|
|
@ -501,7 +501,7 @@ static int open_inet_sk(struct file_desc *d)
|
|||
|
||||
if (ie->v6only) {
|
||||
if (restore_opt(sk, SOL_IPV6, IPV6_V6ONLY, &yes) == -1)
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -509,7 +509,7 @@ static int open_inet_sk(struct file_desc *d)
|
|||
* The origin value of SO_REUSEADDR will be restored in post_open.
|
||||
*/
|
||||
if (restore_opt(sk, SOL_SOCKET, SO_REUSEADDR, &yes))
|
||||
return -1;
|
||||
goto err;
|
||||
|
||||
if (tcp_connection(ie)) {
|
||||
if (!opts.tcp_established_ok) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue