Skip to content

Commit

Permalink
attempt to delete references to callbacks on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdm committed Nov 2, 2013
1 parent 5ff833e commit f82f3fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mosquitto.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,14 @@ static void mosquitto_client_object_destroy(void *object TSRMLS_DC)
mosquitto_loop(client->client, 100, 1);
mosquitto_destroy(client->client);

if (ZEND_FCI_INITIALIZED(client->message_callback)) {
Z_DELREF_P(client->message_callback.function_name);

if (client->message_callback.object_ptr) {
Z_DELREF_P(client->message_callback.object_ptr);
}
}

if (client->std.properties) {
zend_hash_destroy(client->std.properties);
FREE_HASHTABLE(client->std.properties);
Expand Down

0 comments on commit f82f3fd

Please sign in to comment.