Merge pull request #718 from karrots/mqtt_lwt_679

Update mqtt.c fix for #679
This commit is contained in:
Terry Ellison 2015-11-03 08:56:28 +00:00
commit d8c6fe0b25
1 changed files with 1 additions and 1 deletions

View File

@ -1334,7 +1334,7 @@ static int mqtt_socket_lwt( lua_State* L )
{ {
return luaL_error( L, "need lwt message"); return luaL_error( L, "need lwt message");
} }
stack++;
if(mud->connect_info.will_topic){ // free the previous one if there is any if(mud->connect_info.will_topic){ // free the previous one if there is any
c_free(mud->connect_info.will_topic); c_free(mud->connect_info.will_topic);
mud->connect_info.will_topic = NULL; mud->connect_info.will_topic = NULL;