projects
/
m6w6
/
ext-pq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
9e81713
)
gc: ignore recursive calls
author
Michael Wallner
<mike@php.net>
Tue, 10 Aug 2021 07:14:12 +0000
(09:14 +0200)
committer
Michael Wallner
<mike@php.net>
Tue, 10 Aug 2021 07:14:12 +0000
(09:14 +0200)
src/php_pq_object.c
patch
|
blob
|
history
diff --git
a/src/php_pq_object.c
b/src/php_pq_object.c
index c8d1e50bc73d4b1df3c119c48dabf396b4223e2e..5b3f217a95f7e7bb4c9561a7d954a34359787089 100644
(file)
--- a/
src/php_pq_object.c
+++ b/
src/php_pq_object.c
@@
-176,9
+176,11
@@
static inline HashTable *php_pq_object_get_gc_ex(zend_object *object, HashTable
arg.ht = &arg.pq_obj->gc;
arg.gc = 1;
- zend_hash_clean(arg.ht);
- zend_hash_copy(arg.ht, props, NULL);
- zend_hash_apply_with_argument(&arg.pq_obj->zo.ce->properties_info, apply_pi_to_ht, &arg);
+ if (GC_REFCOUNT(arg.ht) == 1) {
+ zend_hash_clean(arg.ht);
+ zend_hash_copy(arg.ht, props, NULL);
+ zend_hash_apply_with_argument(&arg.pq_obj->zo.ce->properties_info, apply_pi_to_ht, &arg);
+ }
*table = NULL;
*n = 0;