1 $DragonFly: src/usr.sbin/sendmail/srvrsmtp.c.patch,v 1.2 2008/03/04 19:23:05 dillon Exp $
4 ===================================================================
5 RCS file: /cvs/src/contrib/sendmail-8.14/sendmail/srvrsmtp.c,v
6 retrieving revision 1.1.1.2
7 diff -u -p -r1.1.1.2 srvrsmtp.c
8 --- srvrsmtp.c 5 Nov 2007 01:37:48 -0000 1.1.1.2
9 +++ srvrsmtp.c 4 Mar 2008 19:17:35 -0000
10 @@ -465,6 +465,8 @@ /* clear all SMTP state (for HELO/EHLO/R
11 #define CLEAR_STATE(cmd) \
14 + SM_RPOOL_T *orpool; \
16 /* abort milter filters */ \
19 @@ -487,8 +489,9 @@ /* clean up a bit */ \
20 smtp.sm_gotmail = false; \
22 dropenvelope(e, true, false); \
23 - sm_rpool_free(e->e_rpool); \
24 + orpool = e->e_rpool; \
25 e = newenvelope(e, CurEnv, sm_rpool_new_x(NULL)); \
26 + sm_rpool_free(orpool); \
28 e->e_features = features; \
30 @@ -3285,6 +3288,7 @@ char *id;
32 unsigned int features;
36 SmtpPhase = "server DATA";
37 if (!smtp->sm_gotmail)
38 @@ -3775,18 +3779,12 @@ if (WILL_BE_QUEUED(ee->e_sendmode))
39 dropenvelope(ee, true, false);
42 - sm_rpool_free(e->e_rpool);
45 - ** At this point, e == &MainEnvelope, but if we did splitting,
46 - ** then CurEnv may point to an envelope structure that was just
47 - ** freed with the rpool. So reset CurEnv *before* calling
52 features = e->e_features;
53 + orpool = e->e_rpool;
54 newenvelope(e, e, sm_rpool_new_x(NULL));
55 + sm_rpool_free(orpool);
56 e->e_flags = BlankEnvelope.e_flags;
57 e->e_features = features;