Fixed a possible double free in imap extension (Identified by Mateusz Kocielski).

This commit is contained in:
Ilia Alshanetsky 2010-11-02 17:50:39 +00:00
parent 309a56f3f7
commit 2bbcc005c7

View File

@ -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 */