mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pkd: Make sure we do not pass -1 to close.
CID: #1245696 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
This commit is contained in:
@@ -451,7 +451,9 @@ static void *pkd_main(void *args) {
|
||||
}
|
||||
}
|
||||
|
||||
close(pkd_state.server_fd);
|
||||
if (pkd_state.server_fd != -1) {
|
||||
close(pkd_state.server_fd);
|
||||
}
|
||||
pkd_state.server_fd = -1;
|
||||
out:
|
||||
ctx.rc = rc;
|
||||
|
||||
Reference in New Issue
Block a user