projects
/
m6w6
/
ext-raphf
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
502a992
)
check for non-persistent key
author
Michael Wallner
<mike@php.net>
Mon, 9 Feb 2015 09:34:00 +0000
(10:34 +0100)
committer
Michael Wallner
<mike@php.net>
Mon, 9 Feb 2015 09:34:00 +0000
(10:34 +0100)
php_raphf.c
patch
|
blob
|
history
diff --git
a/php_raphf.c
b/php_raphf.c
index 1e4276bd6f78483565c3464e8f4db0c34a442f5f..a62897da8b6ee7ed7beb4d856903df90a2ff2f07 100644
(file)
--- a/
php_raphf.c
+++ b/
php_raphf.c
@@
-243,10
+243,21
@@
static inline php_persistent_handle_list_t *php_persistent_handle_list_find(
}
if ((list = php_persistent_handle_list_init(NULL))) {
}
if ((list = php_persistent_handle_list_init(NULL))) {
- zval p;
+ zval p, *rv;
+ zend_string *id;
ZVAL_PTR(&p, list);
ZVAL_PTR(&p, list);
- if (zend_symtable_update(&provider->list.free, ident, &p)) {
+ if ((GC_FLAGS(ident) & IS_STR_PERSISTENT)) {
+ id = ident;
+ } else {
+ ident = zend_string_dup(ident, 1);
+ }
+ rv = zend_symtable_update(&provider->list.free, ident, &p);
+ if (id != ident) {
+ zend_string_release(id);
+ }
+
+ if (rv) {
#if PHP_RAPHF_DEBUG_PHANDLES
fprintf(stderr, "LSTFIND: %p (new)\n", list);
#endif
#if PHP_RAPHF_DEBUG_PHANDLES
fprintf(stderr, "LSTFIND: %p (new)\n", list);
#endif