1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00

- Fixed the crash and leak.

This commit is contained in:
foobar
2004-12-30 05:31:55 +00:00
parent f47d6bc193
commit 57eddbd7d0

View File

@@ -2980,7 +2980,7 @@ PHP_FUNCTION(imap_mail_compose)
bod->contents.text.size = Z_STRLEN_PP(pvalue);
} else {
bod->contents.text.data = (char *) fs_get(1);
bod->contents.text.data = "";
memcpy(bod->contents.text.data, "", 1);
bod->contents.text.size = 0;
}
if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **) &pvalue)== SUCCESS) {
@@ -3194,9 +3194,7 @@ PHP_FUNCTION(imap_mail_compose)
RETVAL_STRING(tempstring, 0);
done:
#if ilia_0 /* this should be done, otherwise we leak memory. Unfortunately this seems to cause a crash in some cases */
mail_free_body(&topbod);
#endif
mail_free_envelope(&env);
}
/* }}} */