Skip to content

Commit

Permalink
fix: most test are failing (crashing) due to lack of refcount increase (
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelewski authored Oct 11, 2022
1 parent 6482bb6 commit f5f2081
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions otel_observer.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ static void find_observers(HashTable *ht, zend_string *n, zend_llist *pre_hooks,
otel_observer *observer = zend_hash_find_ptr_lc(ht, n);
if (observer) {
for (zend_llist_element *element = observer->pre_hooks.head; element; element = element->next) {
zval_add_ref((zval*)&element->data);
zend_llist_add_element(pre_hooks, &element->data);
}
for (zend_llist_element *element = observer->post_hooks.head; element; element = element->next) {
zval_add_ref((zval*)&element->data);
zend_llist_add_element(post_hooks, &element->data);
}
}
Expand Down

0 comments on commit f5f2081

Please sign in to comment.