summaryrefslogtreecommitdiff
path: root/ext/imap/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-10-15 12:51:10 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-10-15 12:54:53 +0200
commit5941b30bb889afcdd7684f9e0ce05ce72bb8256b (patch)
tree88a91a67bd90046db231a93e5aab09930b29a638 /ext/imap/tests
parenta29016d70d72dacb688b4df334508edb550d688f (diff)
downloadphp-git-5941b30bb889afcdd7684f9e0ce05ce72bb8256b.tar.gz
Fix #80239: imap_rfc822_write_address() leaks memory
We have to free the address when we're finished with it.
Diffstat (limited to 'ext/imap/tests')
-rw-r--r--ext/imap/tests/imap_rfc822_write_address_basic.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/imap/tests/imap_rfc822_write_address_basic.phpt b/ext/imap/tests/imap_rfc822_write_address_basic.phpt
new file mode 100644
index 0000000000..92e988c9c9
--- /dev/null
+++ b/ext/imap/tests/imap_rfc822_write_address_basic.phpt
@@ -0,0 +1,12 @@
+--TEST--
+imap_rfc822_write_address() : basic functionality
+--SKIPIF--
+<?php
+if (!extension_loaded('imap')) die('skip imap extension not available');
+?>
+--FILE--
+<?php
+var_dump(imap_rfc822_write_address('me', 'example.com', 'My Name'));
+?>
+--EXPECT--
+string(24) "My Name <me@example.com>"