mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
Fixed memory leak inside array_diff() (coverity issues #401,#402)
This commit is contained in:
parent
9307163e67
commit
91e8740fe4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user