kernel - SWAP CACHE part 22/many - Fix counter overflow introduced in part 21
[dragonfly.git] / usr.sbin / sendmail / srvrsmtp.c.patch
bloba482f502dc99e4e3ad33c9351334f0712bc24581
1 $DragonFly: src/usr.sbin/sendmail/srvrsmtp.c.patch,v 1.2 2008/03/04 19:23:05 dillon Exp $
3 Index: srvrsmtp.c
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) \
12 do \
13 { \
14 + SM_RPOOL_T *orpool; \
15 + \
16 /* abort milter filters */ \
17 MILTER_ABORT(e); \
19 @@ -490,8 +489,9 @@ /* clean up a bit */ \
20 smtp.sm_gotmail = false; \
21 SuprErrs = true; \
22 (void) 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); \
27 CurEnv = e; \
28 e->e_features = features; \
30 @@ -3345,6 +3288,7 @@ char *id;
31 char *oldid;
32 unsigned int features;
33 char buf[32];
34 + SM_RPOOL_T *orpool;
36 SmtpPhase = "server DATA";
37 if (!smtp->sm_gotmail)
38 @@ -3863,8 +3863,9 @@
40 CurEnv = e;
41 features = e->e_features;
42 - sm_rpool_free(e->e_rpool);
43 + orpool = e->e_rpool;
44 newenvelope(e, e, sm_rpool_new_x(NULL));
45 + sm_rpool_free(orpool);
46 e->e_flags = BlankEnvelope.e_flags;
47 e->e_features = features;