Fixed memory leak inside array_diff() (coverity issues #401,#402)

This commit is contained in:
Ilia Alshanetsky 2007-09-22 15:32:11 +00:00
parent 9307163e67
commit 91e8740fe4

View File

@ -3634,6 +3634,8 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
hash = HASH_OF(*args[i]);
list = (Bucket **) pemalloc((hash->nNumOfElements + 1) * sizeof(Bucket *), hash->persistent);
if (!list) {
efree(ptrs);
efree(lists);
RETURN_FALSE;
}
lists[i] = list;