mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-12 22:17:34 +00:00
Merge pull request #167 from gao-yan/ipc-fd-memory-leaks
Fix: ipc: Prevent fd and memory leaks in handle_new_connection()
This commit is contained in:
commit
3245d7ad1d
@ -556,7 +556,14 @@ send_response:
|
||||
"Error in connection setup (%s)",
|
||||
c->description);
|
||||
}
|
||||
qb_ipcs_disconnect(c);
|
||||
|
||||
if (c->state == QB_IPCS_CONNECTION_INACTIVE) {
|
||||
/* This removes the initial alloc ref */
|
||||
qb_ipcs_connection_unref(c);
|
||||
qb_ipcc_us_sock_close(sock);
|
||||
} else {
|
||||
qb_ipcs_disconnect(c);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user