[exim-cvs] Revert "Fix free of $value after ${run...}"

Página Inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] Revert "Fix free of $value after ${run...}"
Gitweb: https://git.exim.org/exim.git/commitdiff/c18090c685f592d2ae944c2d24926394937c15c2
Commit:     c18090c685f592d2ae944c2d24926394937c15c2
Parent:     0fef2df059417b3cc2cc555f65c6064b7dca5442
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Aug 24 15:44:31 2023 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu Aug 24 16:06:34 2023 +0100


    Revert "Fix free of $value after ${run...}"


    This reverts commit cf3fecb9e873df38a9245775a3887e73a8716083.
---
 src/src/expand.c      | 10 ++--------
 test/mail/0635.CALLER | 13 -------------
 2 files changed, 2 insertions(+), 21 deletions(-)


diff --git a/src/src/expand.c b/src/src/expand.c
index ca954ebc2..590b40383 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -5646,8 +5646,6 @@ while (*s)
       FILE * f;
       const uschar * arg, ** argv;
       unsigned late_expand = TSUC_EXPAND_ARGS | TSUC_ALLOW_TAINTED_ARGS | TSUC_ALLOW_RECIPIENTS;
-      uschar * save_value = lookup_value;
-      int yesno;


       if (expand_forbid & RDO_RUN)
         {
@@ -5770,24 +5768,20 @@ while (*s)
             expand_string_message = string_sprintf("command killed by signal %d",
               -runrc);


-      lookup_value = save_value;
           goto EXPAND_FAILED;
           }
         }


       /* Process the yes/no strings; $value may be useful in both cases */


-      yesno = process_yesno(
+      switch(process_yesno(
                flags,            /* were previously skipping */
                runrc == 0,        /* success/failure indicator */
                lookup_value,        /* value to reset for string2 */
                &s,            /* input pointer */
                &yield,            /* output pointer */
                US"run",            /* condition type */
-           &resetok);
-      lookup_value = save_value;
-
-      switch(yesno)
+           &resetok))
         {
         case 1: goto EXPAND_FAILED;          /* when all is well, the */
         case 2: goto EXPAND_FAILED_CURLY;    /* returned value is 0 */
diff --git a/test/mail/0635.CALLER b/test/mail/0635.CALLER
deleted file mode 100644
index 25b61aadd..000000000
--- a/test/mail/0635.CALLER
+++ /dev/null
@@ -1,13 +0,0 @@
-From someone@??? Tue Mar 02 09:44:33 1999
-Received: from CALLER (helo=test)
-    by the.local.host.name with local-smtp (Exim x.yz)
-    (envelope-from <someone@???>)
-    id 10HmaX-000000005vi-0000
-    for CALLER@???;
-    Tue, 2 Mar 1999 09:44:33 +0000
-Message-Id: <E10HmaX-000000005vi-0000@???>
-From: someone@???
-Date: Tue, 2 Mar 1999 09:44:33 +0000
-
-This is a test message.
-


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/