diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 9653ebb732b..67be96b8e3d 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -4246,7 +4246,7 @@ static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, GETS_DA buf[size] = '\0'; } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read from socket"); - efree(buf); + free(buf); buf = NULL; } return buf;