]> granicus.if.org Git - php/commitdiff
Don't need to check for out-of-memory condition.
authorAndrei Zmievski <andrei@php.net>
Mon, 22 Jan 2001 19:42:29 +0000 (19:42 +0000)
committerAndrei Zmievski <andrei@php.net>
Mon, 22 Jan 2001 19:42:29 +0000 (19:42 +0000)
ext/pcre/php_pcre.c

index 74311e35c7ccd60ae6d765020177b59fec4191e8..69acdda7f3a4035c3ca6f8d96b2f8655205cdd5a 100644 (file)
@@ -735,12 +735,6 @@ char *php_pcre_replace(char *regex,   int regex_len,
        
        alloc_len = 2 * subject_len + 1;
        result = emalloc(alloc_len * sizeof(char));
-       if (!result) {
-               zend_error(E_WARNING, "Unable to allocate memory in pcre_replace");
-               efree(re);
-               efree(offsets);
-               return NULL;
-       }
 
        /* Initialize */
        match = NULL;