]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
daemon/cgrulesengd: check the bytes read in cgre_receive_unix_domain_msg()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 10 Aug 2022 17:10:54 +0000 (11:10 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 10 Aug 2022 17:12:02 +0000 (11:12 -0600)
commitc518abe761560c57b15541d85365602e0fce27d8
tree94a2e07bcaa085f9ba933b6ba40ac8802abe6902
parenta56103d2f833e3a1ba532d2a8b0b222fd1cd1bfd
daemon/cgrulesengd: check the bytes read in cgre_receive_unix_domain_msg()

Fix ignoring the number of bytes read, warning reported by Coverity
tool:

CID 258286 (#1 of 1): Ignoring number of bytes read (CHECKED_RETURN).
check_return: read(int, void *, size_t) returns the number of bytes
read, but it is ignored.

In cgre_receive_unix_domain_msg(), the number of bytes read() is
ignored, while reading from the flag value of the pid. Coverity warns on
not checking the number of bytes read, fix it.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit ed283eab173addd3b5c2dd666de8f3086125e106)
src/daemon/cgrulesengd.c