HomeClusterLabs Projects

Fix: libcrmcommon: avoid file descriptor leak in IPC client with async…

Description

Fix: libcrmcommon: avoid file descriptor leak in IPC client with async connection

Previously if qb_ipcc_connect_async() succeeded but the following poll()
failed, the file descriptor would leak.

In that case, given that disconnect function is not registered yet,
qb_ipcc_disconnect() won't clean up the socket. In any case, call
qb_ipcc_connect_continue() here so that it may fail and do the cleanup
for us.

Issue introduced in 2.1.3 by 4b60aa100.

Details

Provenance
gao-yanAuthored on Feb 7 2024, 5:21 AM
Parents
rP60b0b9d9b3ed: Merge pull request #3340 from kgaillot/best-practices
Branches
Unknown
Tags
Unknown