Skip to content

Commit

Permalink
fixed segfault in PHP7 in message destruct
Browse files Browse the repository at this point in the history
  • Loading branch information
argakon committed Oct 18, 2016
1 parent cfaeed1 commit 511f8ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mosquitto_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ void php_mosquitto_message_add_property(HashTable *h, const char *name, size_t n
static void mosquitto_message_object_destroy(zend_object *object TSRMLS_DC)
{
mosquitto_message_object *message = mosquitto_message_object_from_zend_object(object);
#ifdef ZEND_ENGINE_3
zend_object_std_dtor(object);
#else
zend_hash_destroy(message->std.properties);
FREE_HASHTABLE(message->std.properties);

Expand All @@ -499,6 +502,7 @@ static void mosquitto_message_object_destroy(zend_object *object TSRMLS_DC)
}

efree(object);
#endif
}

#ifdef ZEND_ENGINE_3
Expand Down

0 comments on commit 511f8ba

Please sign in to comment.