X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=php_http_client_factory.c;h=d97f68640f10c3076962cdc0ac4cdc3d01214726;hb=1b8751d5926235de8d0a9e26809ed774db709cde;hp=87c4419eb09c2e07ec8542a4cbba9c86630a14fd;hpb=d76e827648dc84038d41fd58f312e5824ec71791;p=m6w6%2Fext-http diff --git a/php_http_client_factory.c b/php_http_client_factory.c index 87c4419..d97f686 100644 --- a/php_http_client_factory.c +++ b/php_http_client_factory.c @@ -38,10 +38,8 @@ PHP_HTTP_API STATUS php_http_client_factory_get_driver(const char *name_str, siz static zend_class_entry *php_http_client_factory_find_class_entry(zval *this_ptr, const char *for_str, size_t for_len TSRMLS_DC) { /* stupid non-const api */ - char *sc = estrndup(for_str, for_len); - zval *cn = zend_read_property(Z_OBJCE_P(getThis()), getThis(), sc, for_len, 0 TSRMLS_CC); + zval *cn = zend_read_property(Z_OBJCE_P(getThis()), getThis(), for_str, for_len, 0 TSRMLS_CC); - efree(sc); if (Z_TYPE_P(cn) == IS_STRING && Z_STRLEN_P(cn)) { return zend_fetch_class(Z_STRVAL_P(cn), Z_STRLEN_P(cn), 0 TSRMLS_CC); }