Make WordPress Core


Ignore:
Timestamp:
07/05/2020 03:20:16 PM (6 years ago)
Author:
SergeyBiryukov
Message:

XML-RPC: Explicitly unset the reference to the parser resource after calling xml_parser_free() to avoid memory leaks in PHP 7.0.0 or higher.

Props procifer, ayeshrajans.
Fixes #49700.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/feed.php

    r48200 r48322  
    565565        $code = xml_get_error_code( $parser );
    566566        xml_parser_free( $parser );
     567        unset( $parser );
    567568
    568569        if ( ! $code ) {
Note: See TracChangeset for help on using the changeset viewer.