forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug72793.phpt
More file actions
36 lines (30 loc) · 750 Bytes
/
bug72793.phpt
File metadata and controls
36 lines (30 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--TEST--
Bug #72793: xml_parser_free leaks mem when execute xml_set_object
--EXTENSIONS--
xml
--FILE--
<?php
class xml {
var $parser;
function __construct()
{
$this->parser = xml_parser_create();
xml_set_object($this->parser, $this);
}
function parse($data)
{
xml_parse($this->parser, $data);
}
function free(){
xml_parser_free($this->parser);
}
}
$xml_test = '<?xml version="1.0" encoding="utf-8"?><test></test>';
$xml_parser = new xml();
$xml_parser->parse($xml_test);
$xml_parser->free();
?>
===DONE===
--EXPECTF--
Deprecated: Function xml_set_object() is deprecated since 8.4, provide a proper method callable to xml_set_*_handler() functions in %s on line %d
===DONE===