From: Damian Hobson-Garcia Date: Mon, 12 Apr 2021 07:43:57 +0000 (+0900) Subject: Don't close invalid or uninitialied fds X-Git-Tag: 10.0.3^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=43feb8701361e43ef43460ae16b3837e97b174ed;hp=43feb8701361e43ef43460ae16b3837e97b174ed;p=src%2Fdrm-lease-manager.git Don't close invalid or uninitialied fds Avoid calling close() on file descriptors that have not been intialized, (or initialized to 0) and descriptors that are known to be invalid. Closing file descriptors due to handle failing initialization is handled in the intialization code. In the lease-manager, file descriptors can be invalid during normal operation, so validity is tested at shutdown. Bug-AGL: SPEC-3862 Change-Id: I798273195cba297c14c6b97d50c7614164fda7df Signed-off-by: Damian Hobson-Garcia ---