xref: /PHP-7.1/ext/gd/tests/bug73161.phpt (revision 8f5eda4b)
1--TEST--
2Bug #73161 (imagecreatefromgd2() may leak memory)
3--DESCRIPTION--
4We're testing for a memory leak that might not even show up with valgrind.
5--SKIPIF--
6<?php
7if (!extension_loaded('gd')) die('skip gd extension not available');
8?>
9--FILE--
10<?php
11$im = imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73161.gd2');
12var_dump($im);
13?>
14===DONE===
15--EXPECTF--
16Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
17bool(false)
18===DONE===
19