On Thu, 11 Jun 2026 11:15:21 -0400
Jon Maloy
conf_open_files() opens three file descriptors (fd_tap_listen, fd_repair_listen, fd_control_listen) that are held for the entire daemon lifetime. Because no close() call exists for them anywhere, Coverity flags each as INCOMPLETE_DEALLOCATOR. This is clearly a false positive, but we still want to get rid of this warning.
We now register the execution context in global area so that passt_exit() can use it to close these descriptors before calling _exit(). All exit paths (signal handler, die(), die_perror()) funnel through passt_exit(), so this covers all cases.
Signed-off-by: Jon Maloy
Reviewed-by: David Gibson --- v2: - Made struct ctx global from the beginning, on suggestion from David Gibson. - Drop pidfile_fd from passt_exit() cleanup, since it can be closed directly after use. v3: - Moved stack declaration of struct *ctx in main() so it fits the reverse Christmas-tree order.
Applied. -- Stefano