Skip to content

Commit 1e7e4ee

Browse files
committed
Fixed issue #327
1 parent 81bc04f commit 1e7e4ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

php_memcached_session.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,9 @@ PS_READ_FUNC(memcached)
435435
payload = memcached_get(memc, key->val, key->len, &payload_len, &flags, &status);
436436

437437
if (status == MEMCACHED_SUCCESS) {
438+
zend_bool *is_persistent = memcached_get_user_data(memc);
438439
*val = zend_string_init(payload, payload_len, 0);
439-
efree(payload);
440+
pefree(payload, *is_persistent);
440441
return SUCCESS;
441442
} else if (status == MEMCACHED_NOTFOUND) {
442443
*val = ZSTR_EMPTY_ALLOC();

0 commit comments

Comments
 (0)