--- mqtt/src/daemon.c 2012/04/11 16:37:17 1.2.2.6 +++ mqtt/src/daemon.c 2012/04/15 22:06:10 1.2.2.7 @@ -421,6 +421,7 @@ Run(int sock) ioTRACE(1); + /* start alternative thread for scheduler */ if (pthread_create(&tid, NULL, thrSched, NULL)) { ioSYSERR(0); return -1; @@ -442,11 +443,12 @@ Run(int sock) } v = io_allocVar(); if (!v) { - ioLIBERR(mqtt); + ioLIBERR(io); break; } else { memset(str, 0, sizeof str); snprintf(str, sizeof str, "%s:%hu", io_n2addr(&sa, v), io_n2port(&sa)); + AIT_FREE_VAL(v); AIT_SET_STR(v, str); } ioDEBUG(1, "Connected client with socket=%d from %s", cli, AIT_GET_STR(v));