Remove my_estrdup() and my_efree() macros

Replace the single use of my_efree().
This commit is contained in:
Nikita Popov 2018-09-17 20:52:12 +02:00
parent 02664aee5c
commit 37dc710ae6
2 changed files with 3 additions and 4 deletions

View file

@ -200,7 +200,9 @@ static void mysqli_objects_free_storage(zend_object *object)
mysqli_object *intern = php_mysqli_fetch_object(object);
MYSQLI_RESOURCE *my_res = (MYSQLI_RESOURCE *)intern->ptr;
my_efree(my_res);
if (my_res) {
efree(my_res);
}
zend_object_std_dtor(&intern->zo);
}
/* }}} */

View file

@ -342,9 +342,6 @@ ZEND_END_MODULE_GLOBALS(mysqli)
ZEND_TSRMLS_CACHE_EXTERN()
#endif
#define my_estrdup(x) (x) ? estrdup(x) : NULL
#define my_efree(x) if (x) efree(x)
ZEND_EXTERN_MODULE_GLOBALS(mysqli)
#endif /* PHP_MYSQLI_STRUCTS.H */