summaryrefslogtreecommitdiff
path: root/ext/imap
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-06-22 14:09:55 +0000
committerPierre Joye <pajoye@php.net>2009-06-22 14:09:55 +0000
commitd1fb4d2da40eab39e72e616aeb6b6678f4cdc0a6 (patch)
treec4f671534b22a44137d5f321381d977234352137 /ext/imap
parentbc8e35748248ebb0d00ed968b339df34d31b7fc0 (diff)
downloadphp-git-d1fb4d2da40eab39e72e616aeb6b6678f4cdc0a6.tar.gz
- #48619, imap_search ALL segfaults
Diffstat (limited to 'ext/imap')
-rw-r--r--ext/imap/php_imap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 7883c2e2c5..9e75da9d67 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -3019,7 +3019,7 @@ PHP_FUNCTION(imap_sort)
slst = mail_sort(imap_le_struct->imap_stream, (argc == 6 ? charset : NIL), spg, mypgm, (argc >= 4 ? flags : NIL));
- if (spg) {
+ if (spg && !(flags & SE_FREE)) {
mail_free_searchpgm(&spg);
}
@@ -3995,7 +3995,7 @@ PHP_FUNCTION(imap_search)
mail_search_full(imap_le_struct->imap_stream, (argc == 4 ? charset : NIL), pgm, flags);
- if (pgm) {
+ if (pgm && !(flags & SE_FREE)) {
mail_free_searchpgm(&pgm);
}
@@ -4611,7 +4611,7 @@ PHP_FUNCTION(imap_thread)
pgm = mail_criteria(criteria);
top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL, pgm, flags);
- if (pgm) {
+ if (pgm && !(flags & SE_FREE)) {
mail_free_searchpgm(&pgm);
}