summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 911d7e9)
raw | patch | inline | side by side (parent: 911d7e9)
author | Max Kellermann <max.kellermann@gmail.com> | |
Sun, 5 Nov 2017 16:18:28 +0000 (17:18 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Sun, 5 Nov 2017 16:18:28 +0000 (17:18 +0100) |
async_rconnect_start() attempts to resolve the host name before it
allocates a struct async_rconnect, and therefore the error callback
may be invoked before "*rcp" gets assigned.
The solution is trivial: remove those assertions, because they are
wrong.
Closes #10
allocates a struct async_rconnect, and therefore the error callback
may be invoked before "*rcp" gets assigned.
The solution is trivial: remove those assertions, because they are
wrong.
Closes #10
NEWS | patch | blob | history | |
src/aconnect.c | patch | blob | history |
index ab2d153cc07cc3ad78b5309f2e6b724adef12ef0..d202e7415fd7595bd0d3c2f34721e29202917c4a 100644 (file)
--- a/NEWS
+++ b/NEWS
ncmpc 0.29 - not yet released
* fix crash after losing MPD connection
+* fix crash after DNS lookup error
ncmpc 0.28 - (2017-09-21)
* fix crash on lyrics screen
diff --git a/src/aconnect.c b/src/aconnect.c
index 701dbeccb5b2db4e6d2cd9fda45520b7b08f0640..82085edb06b419dada29e158d3af92bb96bbd9e5 100644 (file)
--- a/src/aconnect.c
+++ b/src/aconnect.c
aconnect_rconnect_success(int fd, void *ctx)
{
struct aconnect *ac = ctx;
- assert(ac->rconnect != NULL);
ac->rconnect = NULL;
ac->fd = fd;
aconnect_rconnect_error(const char *message, void *ctx)
{
struct aconnect *ac = ctx;
- assert(ac->rconnect != NULL);
ac->rconnect = NULL;
ac->handler->error(message, ac->handler_ctx);