Index: res/res_jabber.c =================================================================== --- res/res_jabber.c (revision 345061) +++ res/res_jabber.c (working copy) @@ -1574,7 +1574,7 @@ int features = 0; if (!node) { - ast_log(LOG_ERROR, "aji_act_hook was called with out a packet\n"); /* most likely cause type is IKS_NODE_ERROR lost connection */ + ast_log(LOG_ERROR, "aji_act_hook was called without a packet\n"); /* most likely cause type is IKS_NODE_ERROR lost connection */ ASTOBJ_UNREF(client, aji_client_destroy); return IKS_HOOK; } @@ -2731,6 +2731,7 @@ if (client->state == AJI_DISCONNECTING) { ast_debug(2, "Ending our Jabber client's thread due to a disconnect\n"); + ASTOBJ_UNREF(client, aji_client_destroy); pthread_exit(NULL); }