diff options
| -rw-r--r-- | src/sp_utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c index e6efcc6..f861fb9 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -393,11 +393,12 @@ bool sp_match_array_key(const zval* zv, const zend_string* to_match, const sp_re | |||
| 393 | char* idx_str = NULL; | 393 | char* idx_str = NULL; |
| 394 | spprintf(&idx_str, 0, ZEND_ULONG_FMT, idx); | 394 | spprintf(&idx_str, 0, ZEND_ULONG_FMT, idx); |
| 395 | zend_string* tmp = zend_string_init(idx_str, strlen(idx_str), 0); | 395 | zend_string* tmp = zend_string_init(idx_str, strlen(idx_str), 0); |
| 396 | if (sp_match_value(tmp, to_match, rx)) { | 396 | bool matched = sp_match_value(tmp, to_match, rx); |
| 397 | efree(idx_str); | 397 | zend_string_release(tmp); |
| 398 | efree(idx_str); | ||
| 399 | if (matched) { | ||
| 398 | return true; | 400 | return true; |
| 399 | } | 401 | } |
| 400 | efree(idx_str); | ||
| 401 | } | 402 | } |
| 402 | } | 403 | } |
| 403 | ZEND_HASH_FOREACH_END(); | 404 | ZEND_HASH_FOREACH_END(); |
