]> granicus.if.org Git - php/commit
Fix #80220: imap_mail_compose() may leak memory
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 12 Oct 2020 08:36:18 +0000 (10:36 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 12 Oct 2020 11:31:30 +0000 (13:31 +0200)
commit0d022ddf03c5fabaaa22e486d1e4a367ed9170a7
tree0d5e12762f3ab8fbaa1273578028b9012c6cada2
parent3c4dd73c023e4aea317f774e045fdccc644f24b5
Fix #80220: imap_mail_compose() may leak memory

Unless `topbod` is of `TYPEMULTIPART`, `mail_free_body()` does not free
the `nested.part`; while we could do this ourselves, instead we just
ignore additional bodies in this case, i.e. we don't attach them in the
first place.

Closes GH-6321.
NEWS
ext/imap/php_imap.c