From 2bbcc005c751b0c337e48df2733a0651083b6455 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 2 Nov 2010 17:50:39 +0000 Subject: [PATCH] Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). --- ext/imap/php_imap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 5781eb2e8a8..61f48684b47 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1209,10 +1209,12 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) if (IMAPG(imap_user)) { efree(IMAPG(imap_user)); + IMAPG(imap_user) = 0; } if (IMAPG(imap_password)) { efree(IMAPG(imap_password)); + IMAPG(imap_password) = 0; } /* local filename, need to perform open_basedir check */