]> granicus.if.org Git - php/commitdiff
- Fix NULL handling in ARRAY opcode and resolve memory leak
authorAndi Gutmans <andi@php.net>
Thu, 14 Sep 2000 20:30:06 +0000 (20:30 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 14 Sep 2000 20:30:06 +0000 (20:30 +0000)
Zend/zend_execute.c

index 4faf7f0c2b10322ca2c28677187341c04895b435..7721dac7034579502931b81bdf9f80ed7337138c 100644 (file)
@@ -1911,7 +1911,11 @@ send_by_ref:
                                                        case IS_STRING:
                                                                zend_hash_update(array_ptr->value.ht, offset->value.str.val, offset->value.str.len+1, &expr_ptr, sizeof(zval *), NULL);
                                                                break;
+                                                       case IS_NULL:
+                                                               zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+                                                               break;
                                                        default:
+                                                               zval_ptr_dtor(&expr_ptr);
                                                                /* do nothing */
                                                                break;
                                                }