diff --git a/ChangeLog.txt b/ChangeLog.txt index ae3c7d48..fa3feae8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -34,7 +34,18 @@ Client: - Add -x to mosquitto_sub for printing the payload in hexadecimal format. -1.4.1 - 2015xxxx +1.4.4 - 20150916 +================ + +Broker: +- Don't leak sockets when outgoing bridge with multiple addresses cannot + connect. Closes #477571. +- Fix cross compiling of websockets. Closes #475807. +- Fix memory free related crashes on openwrt. Closes #475707. +- Fix excessive calls to message retry check. + + +1.4.3 - 20150818 ================ Broker: @@ -58,6 +69,7 @@ Client library: Clients: - Report error string on connection failure rather than error code. + 1.4.2 - 20150507 ================ diff --git a/appveyor.yml b/appveyor.yml index c730d811..8aaeb39c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ environment: CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Release NSIS_ROOT: C:\nsis - SSL_VER: 1_0_2c + SSL_VER: 1_0_2d configuration: - Release diff --git a/lib/mosquitto.c b/lib/mosquitto.c index afc015e9..5f005725 100644 --- a/lib/mosquitto.c +++ b/lib/mosquitto.c @@ -1367,10 +1367,8 @@ int mosquitto_sub_topic_tokenise(const char *subtopic, char ***topics, int *coun tlen = stop-start + 1; (*topics)[hier] = mosquitto__calloc(tlen, sizeof(char)); if(!(*topics)[hier]){ - for(i=0; ibridges[i] = NULL; } } - if(context->bridge->local_clientid){ - mosquitto__free(context->bridge->local_clientid); - context->bridge->local_clientid = NULL; - } - if(context->bridge->remote_username){ - context->bridge->remote_username = NULL; - } - if(context->bridge->remote_password){ - context->bridge->remote_password = NULL; - } - if(context->bridge->local_username){ - context->bridge->local_username = NULL; - } - if(context->bridge->local_password){ - context->bridge->local_password = NULL; - } - if(context->bridge->local_clientid){ - context->bridge->local_clientid = NULL; - } + mosquitto__free(context->bridge->local_clientid); + context->bridge->local_clientid = NULL; + + mosquitto__free(context->bridge->local_username); + context->bridge->local_username = NULL; + + mosquitto__free(context->bridge->local_password); + context->bridge->local_password = NULL; + + mosquitto__free(context->bridge->remote_clientid); + context->bridge->remote_clientid = NULL; + + mosquitto__free(context->bridge->remote_username); + context->bridge->remote_username = NULL; + + mosquitto__free(context->bridge->remote_password); + context->bridge->remote_password = NULL; } #endif net__socket_close(db, context); diff --git a/src/loop.c b/src/loop.c index b5b779d5..72150982 100644 --- a/src/loop.c +++ b/src/loop.c @@ -177,7 +177,7 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li && context->bridge->cur_address != 0 && now > context->bridge->primary_retry){ - if(net__try_connect(context, context->bridge->addresses[0].address, context->bridge->addresses[0].port, &bridge_sock, NULL, false) == MOSQ_ERR_SUCCESS){ + if(net__try_connect(context, context->bridge->addresses[0].address, context->bridge->addresses[0].port, &bridge_sock, NULL, false) <= 0){ COMPAT_CLOSE(bridge_sock); net__socket_close(db, context); context->bridge->cur_address = context->bridge->address_count-1; diff --git a/src/security_default.c b/src/security_default.c index 5dbd49a7..82f29f3f 100644 --- a/src/security_default.c +++ b/src/security_default.c @@ -278,7 +278,7 @@ int mosquitto_acl_check_default(struct mosquitto_db *db, struct mosquitto *conte ulen = 0; len = tlen + acl_root->ccount*(clen-2); } - local_acl = malloc(len+1); + local_acl = mosquitto__malloc(len+1); if(!local_acl) return 1; // FIXME s = local_acl; for(i=0; i