diff --git a/mailparse.c b/mailparse.c index d0520ca..47fe6b0 100644 --- a/mailparse.c +++ b/mailparse.c @@ -1097,7 +1097,7 @@ PHP_FUNCTION(mailparse_msg_free) if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &arg) == FAILURE) { RETURN_FALSE; } - zend_list_delete(Z_RES_P(arg)); + zend_list_close(Z_RES_P(arg)); RETURN_TRUE; } /* }}} */ diff --git a/php_mailparse_mime.c b/php_mailparse_mime.c index 4b36922..a44b2d3 100644 --- a/php_mailparse_mime.c +++ b/php_mailparse_mime.c @@ -325,7 +325,7 @@ PHP_MAILPARSE_API php_mimepart *php_mimepart_alloc() PHP_MAILPARSE_API void php_mimepart_free(php_mimepart *part) { if (part->rsrc) { - zend_list_delete(part->rsrc); + zend_list_close(part->rsrc); part->rsrc = NULL; }