[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] =?utf-8?q?svn:_/pecl/apc/trunk/_apc.c?=
From:       Anatoliy_Belsky <ab () php ! net>
Date:       2012-12-24 12:15:25
Message-ID: svn-ab-1356351325-328880-932823458 () svn ! php ! net
[Download RAW message or body]

ab                                       Mon, 24 Dec 2012 12:15:25 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=328880

Log:
Spare the emalloc here as zend_hash_exists() makes no change to arKey.

Changed paths:
    U   pecl/apc/trunk/apc.c

Modified: pecl/apc/trunk/apc.c
===================================================================
--- pecl/apc/trunk/apc.c	2012-12-24 11:00:53 UTC (rev 328879)
+++ pecl/apc/trunk/apc.c	2012-12-24 12:15:25 UTC (rev 328880)
@@ -340,12 +340,9 @@
         }

         if ((*p == ':') && (n > 1) && (!strncmp("//", p+1, 2) || (n == 4 && \
                !memcmp("data:", path, 5)))) {
-            char *tmp = estrndup(filename, n);
-
-            if (!zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), tmp, n \
+ 1)) { +            if (!zend_hash_exists(php_stream_get_url_stream_wrappers_hash(), \
filename, n + 1)) {  return -1;
             }
-            efree(tmp);
         }
     }



-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic