Commit 526f491a authored by Andrei Vagin's avatar Andrei Vagin

soccr: don't leak memory on error paths

CID 172198 (#1 of 1): Resource leak (RESOURCE_LEAK)
9. leaked_storage: Variable sk going out of scope leaks the storage it points to.
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7a5d310d
......@@ -419,8 +419,10 @@ int restore_one_tcp(int fd, struct inet_sk_info *ii)
if (!sk)
return -1;
if (restore_tcp_conn_state(fd, sk, ii))
if (restore_tcp_conn_state(fd, sk, ii)) {
libsoccr_release(sk);
return -1;
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment