Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

apn.c: 609: ioctlsocket ( cts->sock, ... ) #41

Open
janknepper opened this issue Jul 6, 2017 · 0 comments
Open

apn.c: 609: ioctlsocket ( cts->sock, ... ) #41

janknepper opened this issue Jul 6, 2017 · 0 comments

Comments

@janknepper
Copy link

It seem the 'ctx->sock = sock' assignment on line 644 of apn.c should move up to line 607 (before #ifdef _WIN32).
Right now fcntl/ioctlsocket is called on a -1. (condition of ctx->sock is checked earlier).
Also, in case a connection is never established, ( ! connected ), the socket is never closed as the 'ctx -> sock = sock' assignment will not be performed until past the 'if'statement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant