From: Stig Venaas Date: Fri, 3 Nov 2000 07:20:35 +0000 (+0000) Subject: Fixed memory leak in array_diff and array_intersect, was introduced with X-Git-Tag: php-4.0.4RC3~345 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5c75761c2dcecbfbab5343d7fce54d7278f9e23;p=php Fixed memory leak in array_diff and array_intersect, was introduced with last change. --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 1a558a07fd..8e6b55ab9b 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2288,7 +2288,6 @@ PHP_FUNCTION(array_intersect) efree(args); WRONG_PARAM_COUNT; } - array_init(return_value); /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **)); @@ -2394,7 +2393,6 @@ PHP_FUNCTION(array_diff) efree(args); WRONG_PARAM_COUNT; } - array_init(return_value); /* for each argument, create and sort list with pointers to the hash buckets */ lists = (Bucket ***)emalloc(argc * sizeof(Bucket **)); ptrs = (Bucket ***)emalloc(argc * sizeof(Bucket **));