Index: Makefile =================================================================== RCS file: /cvs/src/usr.sbin/sendmail/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- Makefile 18 Feb 2008 19:47:32 -0000 1.18 +++ Makefile 4 Mar 2008 19:10:51 -0000 @@ -7,7 +7,7 @@ .PATH: ${SMDIR} CONTRIBDIR= ${SMDIR} -PATCHES= mci.c.patch main.c.patch +PATCHES= mci.c.patch main.c.patch srvrsmtp.c.patch BINDIR= /usr/libexec/sendmail Index: srvrsmtp.c.patch =================================================================== RCS file: srvrsmtp.c.patch diff -N srvrsmtp.c.patch --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ srvrsmtp.c.patch 4 Mar 2008 19:18:02 -0000 @@ -0,0 +1,58 @@ +$DragonFly$ + +Index: srvrsmtp.c +=================================================================== +RCS file: /cvs/src/contrib/sendmail-8.14/sendmail/srvrsmtp.c,v +retrieving revision 1.1.1.2 +diff -u -p -r1.1.1.2 srvrsmtp.c +--- srvrsmtp.c 5 Nov 2007 01:37:48 -0000 1.1.1.2 ++++ srvrsmtp.c 4 Mar 2008 19:17:35 -0000 +@@ -465,6 +465,8 @@ /* clear all SMTP state (for HELO/EHLO/R + #define CLEAR_STATE(cmd) \ + do \ + { \ ++ SM_RPOOL_T *orpool; \ ++ \ + /* abort milter filters */ \ + MILTER_ABORT(e); \ + \ +@@ -487,8 +489,9 @@ /* clean up a bit */ \ + smtp.sm_gotmail = false; \ + SuprErrs = true; \ + dropenvelope(e, true, false); \ +- sm_rpool_free(e->e_rpool); \ ++ orpool = e->e_rpool; \ + e = newenvelope(e, CurEnv, sm_rpool_new_x(NULL)); \ ++ sm_rpool_free(orpool); \ + CurEnv = e; \ + e->e_features = features; \ + \ +@@ -3285,6 +3288,7 @@ char *id; + char *oldid; + unsigned int features; + char buf[32]; ++ SM_RPOOL_T *orpool; + + SmtpPhase = "server DATA"; + if (!smtp->sm_gotmail) +@@ -3775,18 +3779,12 @@ if (WILL_BE_QUEUED(ee->e_sendmode)) + dropenvelope(ee, true, false); + } + } +- sm_rpool_free(e->e_rpool); +- +- /* +- ** At this point, e == &MainEnvelope, but if we did splitting, +- ** then CurEnv may point to an envelope structure that was just +- ** freed with the rpool. So reset CurEnv *before* calling +- ** newenvelope. +- */ + + CurEnv = e; + features = e->e_features; ++ orpool = e->e_rpool; + newenvelope(e, e, sm_rpool_new_x(NULL)); ++ sm_rpool_free(orpool); + e->e_flags = BlankEnvelope.e_flags; + e->e_features = features; +