]> granicus.if.org Git - php/commitdiff
- Hrm I'm not concentrating
authorAndi Gutmans <andi@php.net>
Wed, 19 Jan 2000 18:14:20 +0000 (18:14 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 19 Jan 2000 18:14:20 +0000 (18:14 +0000)
Zend/zend_hash.c

index b25b732bc04b97960e09ce5929ff3b4e9772695c..c3563852a54e224641a7c62597520a4374dc8a11 100644 (file)
@@ -553,15 +553,15 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLen
                        } else {
                                ht->pListTail = p->pListLast;
                        }
-                       if (!p->pDataPtr) {
-                               pefree(p->pData,ht->persistent);
-                       }
                        if (ht->pInternalPointer == p) {
                                ht->pInternalPointer = p->pListNext;
                        }
                        if (ht->pDestructor) {
                                ht->pDestructor(p->pData);
                        }
+                       if (!p->pDataPtr) {
+                               pefree(p->pData,ht->persistent);
+                       }
                        pefree(p,ht->persistent);
                        HANDLE_UNBLOCK_INTERRUPTIONS();
                        ht->nNumOfElements--;